From 69b57e5efdc8a25025606569f8f20ea508a5263d Mon Sep 17 00:00:00 2001 From: Andrew Thomas Sartor Date: Fri, 19 Apr 2024 12:23:10 +0900 Subject: 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. --- ext/js/input/hotkey-handler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/js/input') 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'; } } -- cgit v1.2.3