diff options
author | siikamiika <siikamiika@users.noreply.github.com> | 2019-10-26 15:15:12 +0300 |
---|---|---|
committer | siikamiika <siikamiika@users.noreply.github.com> | 2019-10-26 15:15:12 +0300 |
commit | 50769feea71943051eaf12f1d96bc6305746959f (patch) | |
tree | 475fbee592b61b8e609fb41a69c125533f0f1162 /ext | |
parent | 9132814ccf15ec2d1272c14e4840f4affad94706 (diff) |
ignore more keys on search page
Diffstat (limited to 'ext')
-rw-r--r-- | ext/bg/js/search.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index 1a6822f6..6481e16a 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -104,17 +104,21 @@ class DisplaySearch extends Display { let activeModifierMap = { 'Control': e.ctrlKey, - 'Meta': e.metaKey + 'Meta': e.metaKey, + 'ANY_MOD': true }; - // true if no known modifier is pressed - activeModifierMap[undefined] = !Object.values(activeModifierMap).includes(true); const ignoreKeys = { - undefined: ['Tab'], - 'Control': ['C', 'A', 'Z', 'Y', 'X', 'F'], - 'Meta': ['C', 'A', 'Z', 'Y', 'X', 'F'], + 'ANY_MOD': ['Tab', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'PageDown', 'PageUp', 'Home', 'End'] + .concat( + Array.from(Array(24).keys()) + .map(i => `F${i + 1}`) + ), + 'Control': ['C', 'A', 'Z', 'Y', 'X', 'F', 'G'], + 'Meta': ['C', 'A', 'Z', 'Y', 'X', 'F', 'G'], 'OS': [], 'Alt': [], + 'AltGraph': [], 'Shift': [] } |