-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from github/normalize-uppercase-macos
Normalize key to uppercase on MacOS when `Shift` is held
- Loading branch information
Showing
4 changed files
with
77 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
* Map of 'uppercase' symbols to the keys that would be pressed (while holding `Shift`) to type them on MacOS on an | ||
* English layout. Most of these are standardized across most language layouts, so this won't work 100% in every | ||
* language but it should work most of the time. | ||
* | ||
*/ | ||
export const macosUppercaseLayerKeys: Record<string, string> = { | ||
['`']: '~', | ||
['1']: '!', | ||
['2']: '@', | ||
['3']: '#', | ||
['4']: '$', | ||
['5']: '%', | ||
['6']: '^', | ||
['7']: '&', | ||
['8']: '*', | ||
['9']: '(', | ||
['0']: ')', | ||
['-']: '_', | ||
['=']: '+', | ||
['[']: '{', | ||
[']']: '}', | ||
['\\']: '|', | ||
[';']: ':', | ||
["'"]: '"', | ||
[',']: '<', | ||
['.']: '>', | ||
['/']: '?', | ||
['q']: 'Q', | ||
['w']: 'W', | ||
['e']: 'E', | ||
['r']: 'R', | ||
['t']: 'T', | ||
['y']: 'Y', | ||
['u']: 'U', | ||
['i']: 'I', | ||
['o']: 'O', | ||
['p']: 'P', | ||
['a']: 'A', | ||
['s']: 'S', | ||
['d']: 'D', | ||
['f']: 'F', | ||
['g']: 'G', | ||
['h']: 'H', | ||
['j']: 'J', | ||
['k']: 'K', | ||
['l']: 'L', | ||
['z']: 'Z', | ||
['x']: 'X', | ||
['c']: 'C', | ||
['v']: 'V', | ||
['b']: 'B', | ||
['n']: 'N', | ||
['m']: 'M' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters