mirror of
https://github.com/jiojciojsioe3/a3cjroijsiojiorj.git
synced 2024-12-23 09:46:15 +08:00
only update lastKeyEvent on don/ka keys
This commit is contained in:
parent
790f77bd6d
commit
c2f111a91f
@ -81,7 +81,9 @@ class PageEvents{
|
||||
})
|
||||
}
|
||||
keyEvent(event){
|
||||
this.lastKeyEvent = Date.now()
|
||||
if ([68, 70, 74, 75].indexOf(event.keyCode) > -1) { // D, F, J, K
|
||||
this.lastKeyEvent = Date.now()
|
||||
}
|
||||
this.keyListeners.forEach(addedKeyCode => {
|
||||
this.checkListener(addedKeyCode.get("all"), event)
|
||||
this.checkListener(addedKeyCode.get(event.keyCode), event)
|
||||
|
Loading…
Reference in New Issue
Block a user