/
The .keybinding {keys} docs ↗ function displays a keyboard shortcut or key combination.
Press .keybinding {Mod+K} to trigger the action.Press CtrlK to trigger the action.
Keys are separated by +, ,, or - delimiters.
On macOS, modifier keys automatically display their native symbols (e.g. Command instead of Ctrl).
If you’re on macOS right now, you can notice the difference in the above example: the first keybinding displays as
Ctrl Kon other platforms, but as⌘ Kon macOS.
The following modifier names are recognized (case-insensitive):
| Input | Default display | macOS display |
|---|---|---|
cmd, command, meta, mod | Ctrl | ⌘ |
ctrl, control | Ctrl | ⌃ |
alt, option | Alt | ⌥ |
shift | Shift | ⇧ |
Any other key name is displayed as-is, capitalized.
.keybinding {Cmd+Alt+Tab}.keybinding {Alt+F4}Since +, ,, and - are reserved as delimiters, use their literal names to represent them as keys:
| Literal | Key |
|---|---|
plus | + |
comma | , |
dash, minus | - |
dot, period | . |
.keybinding {Ctrl+plus}.keybinding {Ctrl+dot}