Skip to content

Commit

Permalink
refactor(keyboard): onkeyup replace to onkeydown
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryshelomanov committed Feb 24, 2020
1 parent 10d4f68 commit 38e3c29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const KEYS = {
export function keyboradFactory() {
let pressedKeys = {}

document.addEventListener('keyup', (event) => {
document.addEventListener('keydown', (event) => {
event.preventDefault()

pressedKeys = {}
Expand Down

0 comments on commit 38e3c29

Please sign in to comment.