Skip to content

Commit

Permalink
Merge pull request mdn#311 from ruippeixe/patch-1
Browse files Browse the repository at this point in the history
keypress event changed to keydown
  • Loading branch information
chrisdavidmills authored Feb 6, 2021
2 parents 5f0bbf8 + e322d95 commit 499d45d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions javascript/building-blocks/tasks/events/marking.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ drawCircle(x, y, size);

// Add your code here

window.addEventListener('keypress', (e) => {
window.addEventListener('keydown', (e) => {
switch(e.key) {
case 'a':
x -= 2;
Expand Down Expand Up @@ -93,4 +93,4 @@ function setColor(e) {
}

buttonBar.addEventListener('click', setColor);
```
```

0 comments on commit 499d45d

Please sign in to comment.