Skip to content

Commit

Permalink
Merge pull request #1124 from nperez0111/main
Browse files Browse the repository at this point in the history
Fix default value for mapKey
  • Loading branch information
JohannesKlauss authored Aug 19, 2024
2 parents 3ea2cba + 4290ad3 commit e921499
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/parseHotkeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const mappedKeys: Record<string, string> = {
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/, '')
Expand Down

0 comments on commit e921499

Please sign in to comment.