diff options
Diffstat (limited to 'internal/ui/static/js/keyboard_handler.js')
-rw-r--r-- | internal/ui/static/js/keyboard_handler.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/ui/static/js/keyboard_handler.js b/internal/ui/static/js/keyboard_handler.js index 863309d9..eb5b0548 100644 --- a/internal/ui/static/js/keyboard_handler.js +++ b/internal/ui/static/js/keyboard_handler.js @@ -12,7 +12,7 @@ class KeyboardHandler { listen() { document.onkeydown = (event) => { - let key = this.getKey(event); + const key = this.getKey(event); if (this.isEventIgnored(event, key) || this.isModifierKeyDown(event)) { return; } @@ -23,8 +23,8 @@ class KeyboardHandler { this.queue.push(key); - for (let combination in this.shortcuts) { - let keys = combination.split(" "); + for (const combination in this.shortcuts) { + const keys = combination.split(" "); if (keys.every((value, index) => value === this.queue[index])) { this.queue = []; @@ -64,7 +64,7 @@ class KeyboardHandler { 'Right': 'ArrowRight' }; - for (let key in mapping) { + for (const key in mapping) { if (mapping.hasOwnProperty(key) && key === event.key) { return mapping[key]; } |