-
Notifications
You must be signed in to change notification settings - Fork 97
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 #110 from github/mac-alt-support
Add support for alt/option on Mac via symbol map
- Loading branch information
Showing
3 changed files
with
114 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/** | ||
* Map of special symbols to the keys that would be pressed (while holding `Option`) 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 macosSymbolLayerKeys: Record<string, string> = { | ||
['¡']: '1', | ||
['™']: '2', | ||
['£']: '3', | ||
['¢']: '4', | ||
['∞']: '5', | ||
['§']: '6', | ||
['¶']: '7', | ||
['•']: '8', | ||
['ª']: '9', | ||
['º']: '0', | ||
['–']: '-', | ||
['≠']: '=', | ||
['`']: '~', | ||
['⁄']: '!', | ||
['€']: '@', | ||
['‹']: '#', | ||
['›']: '$', | ||
['fi']: '%', | ||
['fl']: '^', | ||
['‡']: '&', | ||
['°']: '*', | ||
['·']: '(', | ||
['‚']: ')', | ||
['—']: '_', | ||
['±']: '+', | ||
['œ']: 'q', | ||
['∑']: 'w', | ||
['®']: 'r', | ||
['†']: 't', | ||
['¥']: 'y', | ||
['ø']: 'o', | ||
['π']: 'p', | ||
['“']: '[', | ||
['‘']: ']', | ||
['«']: '\\', | ||
['Œ']: 'Q', | ||
['„']: 'W', | ||
['´']: 'E', | ||
['‰']: 'R', | ||
['ˇ']: 'T', | ||
['Á']: 'Y', | ||
['¨']: 'U', | ||
['ˆ']: 'I', | ||
['Ø']: 'O', | ||
['∏']: 'P', | ||
['”']: '{', | ||
['’']: '}', | ||
['»']: '|', | ||
['å']: 'a', | ||
['ß']: 's', | ||
['∂']: 'd', | ||
['ƒ']: 'f', | ||
['©']: 'g', | ||
['˙']: 'h', | ||
['∆']: 'j', | ||
['˚']: 'k', | ||
['¬']: 'l', | ||
['…']: ';', | ||
['æ']: "'", | ||
['Å']: 'A', | ||
['Í']: 'S', | ||
['Î']: 'D', | ||
['Ï']: 'F', | ||
['˝']: 'G', | ||
['Ó']: 'H', | ||
['Ô']: 'J', | ||
['']: 'K', | ||
['Ò']: 'L', | ||
['Ú']: ':', | ||
['Æ']: '"', | ||
['Ω']: 'z', | ||
['≈']: 'x', | ||
['ç']: 'c', | ||
['√']: 'v', | ||
['∫']: 'b', | ||
['µ']: 'm', | ||
['≤']: ',', | ||
['≥']: '.', | ||
['÷']: '/', | ||
['¸']: 'Z', | ||
['˛']: 'X', | ||
['Ç']: 'C', | ||
['◊']: 'V', | ||
['ı']: 'B', | ||
['˜']: 'N', | ||
['Â']: '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