From c2f111a91f0e6dffcd95776801eebf6038140564 Mon Sep 17 00:00:00 2001 From: Bui Date: Sun, 23 Dec 2018 14:29:03 +0000 Subject: [PATCH] only update lastKeyEvent on don/ka keys --- public/src/js/pageevents.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/src/js/pageevents.js b/public/src/js/pageevents.js index 741804e..789275e 100644 --- a/public/src/js/pageevents.js +++ b/public/src/js/pageevents.js @@ -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)