A mapping from key names to macOS virtual key codes, following the current keyboard layout.
This is the same mapping hs.hotkey and hs.eventtap use to turn a key name into a key
code. For the reverse direction, use names. The map is rebuilt automatically whenever
the keyboard input source changes.
Names include:
Characters: every character the current layout types with no modifiers held. Characters
the layout doesn't type (e.g. 1 on AZERTY) map to their US-ANSI key position.
Punctuation words: minus, equal, leftbracket, rightbracket, backslash,
semicolon, quote, comma, period, slash, grave. Each is the key that types that
character in the current layout, so comma and , are always the same key.
Function keys: f1–f20
Navigation: home, end, pageup, pagedown, left, right, up, down
A mapping from key names to macOS virtual key codes, following the current keyboard layout.
This is the same mapping
hs.hotkeyandhs.eventtapuse to turn a key name into a key code. For the reverse direction, usenames. The map is rebuilt automatically whenever the keyboard input source changes.Names include:
1on AZERTY) map to their US-ANSI key position.minus,equal,leftbracket,rightbracket,backslash,semicolon,quote,comma,period,slash,grave. Each is the key that types that character in the current layout, socommaand,are always the same key.f1–f20home,end,pageup,pagedown,left,right,up,downpad0–pad9,pad.,pad+,pad-,pad*,pad/,pad=,padenter,padclearcmd,rightcmd,shift,ctrl,alt,rightshift,rightalt,rightctrl,fn,capslockreturn,tab,space,delete,forwarddelete,escape,helpvolup,voldown,muteyen,underscore,pad,,eisu,kana