Type Alias: HotkeyString
HotkeyString = `${"Mod" | "Ctrl" | "Meta" | "Alt" | "Shift" | "None"}+${Capitalize<string>}`
Defined in: coreUtils/hotkey.ts:20
Represents a keyboard press sequence expression for a hotkey.
The valid hotkey expression is at least one or more modifiers and the key separated by +
,
e.g. Ctrl+Alt+K
, Alt+Meta+Q
, Ctrl+/
:
- modifier is one of
Mod
,Ctrl
,Meta
,Alt
,Shift
(Mod
isMeta
on Mac andCtrl
everywhere else). - key is a KeyboardEvent.key
with a special case for
A-Z
keys to handle them independently of an active keyboard layout. - single-letter keys are matched case-insensitively, so
Ctrl+Shift+a
is the same asCtrl+Shift+A
. Shift
-specific special keys needs to be specified as-is i.e.Shift+5
will not be triggered and should be specified asShift+%
(and only for keyboard layouts with that mapping).