Skip to content

Combo syntax

A combo is a +-separated string of modifiers plus one key:

"mod+s"        "mod+shift+k"      "alt+enter"      "shift+/"

Modifiers

TokenMeaning
mod on macOS, Ctrl elsewhere — use this one
meta / cmd / commandthe ⌘/Win key literally
ctrl / controlControl literally
alt / option / optAlt/Option
shiftShift

Prefer mod over cmd/ctrl so one default works on every platform.

Keys

Single characters (az, 09, punctuation) plus named keys:

enter  esc  space  tab  backspace  delete  up  down  left  right

Aliases accepted: returnenter, escescape, plus+, deldelete.

Matching details

  • Modifier state must match exactlymod+s does not fire on mod+shift+s.
  • When Alt or Shift transform the typed character (e.g. ⌥K → ˚), matching falls back to the physical key code, so alt+k works as expected.
  • Shortcuts don't fire while focus is in an input, textarea, select, or contenteditable — unless the shortcut sets enableOnFormTags: true.
  • Single chords only for now; sequences (g d) are on the roadmap.

Display

displayParts(combo) renders platform-appropriate keycaps:

ts
displayParts("mod+shift+k");
// macOS   → ["⌘", "⇧", "K"]
// Windows → ["Ctrl", "Shift", "K"]

Free during beta · local-first usage stays free.