The command is a single selector, or a selector with arguments
OptionalifOptionalifIf specified, this indicates in which mode this keybinding will apply. If none is specified, the keybinding will apply in every mode.
OptionalifIf specified, this indicates the OS platform to which this keybinding apply.
For example, if set to !macos this key binding will apply to every
platform, except macOS.
The pressed keys that will trigger this keybinding.
The key is made up of modifiers and the key itself.
The following modifiers can be used:
| Platform | Modifiers |
|---|---|
| macOS, iOS | ctrl, shift, alt, cmd |
| Windows | ctrl, shift, alt, win |
| Linux, Android, ChromeOS | ctrl, shift, alt, meta |
If the cmd modifier is used, the keybinding will only apply on macOS.
If the win modifier is used, the keybinding will only apply to Windows.
If the meta modifier is used, the keybinding will apply to platforms
other than macOS or Windows.
The alt key is the option key on Apple keyboards.
The following values for keys can be used:
a–z, 0–9`, -, =, [, ], \, ;, ', ,, ., /left, up, right, down, pageup, pagedown, end, hometab, enter, escape, space, backspace, deletef1–f19pausebreak, capslock, insertnumpad0–numpad9, numpad_multiply, numpad_add, numpad_separatornumpad_subtract, numpad_decimal, numpad_divideThe values will be remapped based on the current keyboard layout. So, for
example if a is used, on a French AZERTY keyboard the keybinding will be
associated with the key labeled 'A' (event though it corresponds to the
key labeled 'Q' on a US QWERTY keyboard).
To associate keybindings with physical keys independent of the keyboard layout, use the following keycodes:
[KeyA]–[KeyZ], [Digit0]–[Digit9][Backquote], [Minus], [Equal], [BracketLeft], [BracketRight], [Backslash], [Semicolon], [Quote], [Comma], [Period], [Slash][ArrowLeft], [ArrowUp], [ArrowRight], [ArrowDown], [PageUp], [PageDown], [End], [Home][Tab], [Enter], [Escape], [Space], [Backspace], [Delete][F1]–[F19][Pause], [CapsLock], [Insert][Numpad0]–[Numpad9], [NumpadMultiply], [NumpadAdd], [NumpadComma][NumpadSubtract], [NumpadDecimal], [NumpadDivide]For example, using [KeyQ] will map to the the key labeled 'Q' on a QWERTY
keyboard, and to the key labeled 'A' on an AZERTY keyboard.
As a general guideline, it is preferable to use the key values a–z
for keybinding that are pseudo-mnemotechnic. For the other, it is generally
preferable to use the keycodes.
Consider the key combination: alt+2. With an AZERTY (French) layout,
the digits (i.e. '2') are only accessible when shifted. The '2' key produces
'é' when not shifted. It is therefore impossible on an AZERTY keyboard to
produce the alt+2 key combination, at best it would be alt+shift+2.
To indicate that the intended key combination should be alt and the
key on the keyboard which has the position of the 2 key on a US keyboard,
a key code should be used instead: alt+[Digit2]. This will correspond
to a key combination that can be generated on any keyboard.
A keybinding associates a combination of physical keyboard keys with a command.
For example: