From ae6575043e46158247194f4d7189d9d2586b05a4 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Thu, 6 Jun 2024 00:50:58 +0200 Subject: [PATCH] fix keyboard shortcut handling for default shortcuts --- src/ext/lib/kbm/KeyboardHandler.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ext/lib/kbm/KeyboardHandler.ts b/src/ext/lib/kbm/KeyboardHandler.ts index 9d2f286..75ac539 100644 --- a/src/ext/lib/kbm/KeyboardHandler.ts +++ b/src/ext/lib/kbm/KeyboardHandler.ts @@ -186,17 +186,17 @@ export class KeyboardHandler extends KbmBase { isActionMatchStandard(shortcut, event) { return shortcut.key === event.key && - shortcut.ctrlKey === event.ctrlKey && - shortcut.metaKey === event.metaKey && - shortcut.altKey === event.altKey && - shortcut.shiftKey === event.shiftKey + !!shortcut.ctrlKey === event.ctrlKey && + !!shortcut.metaKey === event.metaKey && + !!shortcut.altKey === event.altKey && + !!shortcut.shiftKey === event.shiftKey; } isActionMatchKeyCode(shortcut, event) { return shortcut.code === event.code && - shortcut.ctrlKey === event.ctrlKey && - shortcut.metaKey === event.metaKey && - shortcut.altKey === event.altKey && - shortcut.shiftKey === event.shiftKey + !!shortcut.ctrlKey === event.ctrlKey && + !!shortcut.metaKey === event.metaKey && + !!shortcut.altKey === event.altKey && + !!shortcut.shiftKey === event.shiftKey } isActionMatch(shortcut, event, isLatin = true) {