目录

Shortcut

A shortcut is a string in the format 'CommandOrControl+Shift+F'.

Tokens are separated by + and are case-insensitive. The last token must be a key code; all preceding tokens must be modifiers.

Modifiers

Token(s)Description
CommandOrControl, CmdOrCtrlCommand on macOS, Control on Windows/Linux.
Command, Cmd, Meta, SuperThe Command / Meta key (macOS).
Control, CtrlThe Control key.
ShiftThe Shift key.
Alt, OptionThe Alt / Option key.
AltGrThe AltGr key (Windows/Linux).

Named key codes

Token(s)Description
BackspaceBackspace key.
CapsLockCaps Lock key.
DeleteDelete key.
Down, Up, Left, RightArrow keys.
EndEnd key.
Enter, ReturnEnter / Return key.
Esc, EscapeEscape key.
F1F24Function keys.
HomeHome key.
InsertInsert key.
MediaNextTrackMedia Next Track key.
MediaPlayPauseMedia Play/Pause key.
MediaPreviousTrackMedia Previous Track key.
MediaStopMedia Stop key.
Num0Num9Numpad digit keys.
NumAddNumpad + key.
NumDecNumpad decimal key.
NumDivNumpad / key.
NumLockNum Lock key.
NumMultNumpad * key.
NumSubNumpad - key.
PageDownPage Down key.
PageUpPage Up key.
PlusThe + key.
PrintScreenPrint Screen key.
ScrollLockScroll Lock key.
SpaceSpace bar.
TabTab key.
VolumeDownVolume Down key.
VolumeMuteVolume Mute key.
VolumeUpVolume Up key.

Single-character key codes

Any single ASCII character can be used as a key code directly, e.g. AZ, 09, and punctuation such as ,, -, ., /, ;, =, [, \, ], `, and '. Characters that require Shift (e.g. !, @, #, $, %, ^, &, *, (, ), +, :, <, >, ?, ", {, |, }, ~, _) implicitly add the Shift modifier.

type Shortcut = string;

Example 

‘CommandOrControl+Shift+Z’ ‘Ctrl+Alt+Delete’ ‘F5’ ‘Shift+F’