Skip to content

Commit

Permalink
Merge pull request #114 from github/no-symbol-plane-without-alt
Browse files Browse the repository at this point in the history
Don't use symbol plane unless `Alt` is pressed
  • Loading branch information
iansan5653 authored Dec 5, 2023
2 parents 13f3419 + fba17fb commit caec920
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/hotkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ export function eventToHotkeyString(
}

if (!modifierKeyNames.includes(key)) {
const nonOptionPlaneKey = matchApplePlatform.test(platform) ? macosSymbolLayerKeys[key] ?? key : key
const nonOptionPlaneKey =
hotkeyString.includes('Alt') && matchApplePlatform.test(platform) ? macosSymbolLayerKeys[key] ?? key : key
const syntheticKey = syntheticKeyNames[nonOptionPlaneKey] ?? nonOptionPlaneKey
hotkeyString.push(syntheticKey)
}
Expand Down
1 change: 0 additions & 1 deletion src/macos-symbol-layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const macosSymbolLayerKeys: Record<string, string> = {
['º']: '0',
['–']: '-',
['≠']: '=',
['`']: '`',
['⁄']: '!',
['€']: '@',
['‹']: '#',
Expand Down

0 comments on commit caec920

Please sign in to comment.