diff --git a/src/parseHotkeys.ts b/src/parseHotkeys.ts index cfc6ddb6..f1ef21d3 100644 --- a/src/parseHotkeys.ts +++ b/src/parseHotkeys.ts @@ -24,8 +24,8 @@ const mappedKeys: Record = { ControlRight: 'ctrl', } -export function mapKey(key: string): string { - return (mappedKeys[key] || key) +export function mapKey(key?: string): string { + return (mappedKeys[key] || key || '') .trim() .toLowerCase() .replace(/key|digit|numpad|arrow/, '')