throng v1.0.0-beta4

Multi-key chords

A chord can carry up to three keys under held modifiers, written with commas: Ctrl+E,W means hold Ctrl, press E, then W, then let go. The modifiers pressed with the first key must stay held until the last key; a later key may add a modifier of its own, which belongs to that key alone: Ctrl+E,Shift+W is Ctrl held throughout, with Shift added for the W. Pressing the first key alone does nothing visible: throng waits for the next key.

  • The first key must carry a modifier (Ctrl, Shift or Alt), and every key must be a real key, not a modifier on its own.
  • A command that is live in a terminal takes a multi-key chord only when it is one of the window's own commands (zoom, focus, the side panes, the split commands and the rest of the Everywhere rows) and its first key is not one a shell needs (the list above). The window catches those keys before the terminal, so the shell receives neither. Any other multi-key chord on a terminal command would hand its first key to the shell as typing: the capture box refuses it, and a hand-written one in keybindings.json is ignored on load.
  • For those window commands, the modifiers need not stay held: Ctrl+Shift+Alt+End released and then a bare arrow completes a split as it does with the modifiers still down.
  • A multi-key chord clashes with a shorter chord that is its own prefix: with Ctrl+E,W bound, binding Ctrl+E to another command in an overlapping scope would make the longer one unreachable, and the capture box tells you. Two multi-key chords that share a first key do not clash: the next key decides.
  • A fourth key is refused. So is a later key struck after you let go of a first-key modifier: that makes separate presses.