diff --git a/src/utilities/ShortcutManager.ts b/src/utilities/ShortcutManager.ts index b517387c0b..42e7bd7b78 100644 --- a/src/utilities/ShortcutManager.ts +++ b/src/utilities/ShortcutManager.ts @@ -78,6 +78,10 @@ export class ShortcutManager { } function triggerShortcuts(event: KeyboardEvent, keyMap: Record, commands: Record): void { + if (!event.code) { + return + } + const code = normalizeKeyCode(event.code) const shortcut = [ event.ctrlKey ? 'ctrl' : '',