summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Thomas Sartor <andrew@sartor.net>2024-04-19 12:23:10 +0900
committerGitHub <noreply@github.com>2024-04-19 03:23:10 +0000
commit69b57e5efdc8a25025606569f8f20ea508a5263d (patch)
tree5a13a570f026a4b598e34aa6cdc0223bdc5a09d7
parent65ee2c8f6fe3ed3f67c697146ce683a0f918d85a (diff)
Change hotkey triggering condition to account for IME usage (#837)
_isKeyCharacterInput only worked when not using an IME, as inside of an IME when a keydown event is fired, the key is reported as "Process", which does not have a key.length equal to 1. This resulted in hotkeys being triggered while typing, which this commit fixes.
-rw-r--r--ext/js/input/hotkey-handler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/js/input/hotkey-handler.js b/ext/js/input/hotkey-handler.js
index 818c0155..0f11fe87 100644
--- a/ext/js/input/hotkey-handler.js
+++ b/ext/js/input/hotkey-handler.js
@@ -279,6 +279,6 @@ export class HotkeyHandler extends EventDispatcher {
* @returns {boolean}
*/
_isKeyCharacterInput(key) {
- return key.length === 1;
+ return key.length === 1 || key === 'Process';
}
}