User guide / Custom key bindings

Changing the leader and window keys

Development reference · View source

keys:
  leader: Ctrl-x
  window: Ctrl-a
  • Each takes exactly one key.
  • window cannot be an unmodified character, including Space. It is captured in Insert, Replace, and Terminal Insert modes, so a plain character would make that character impossible to type.

A new window prefix moves the whole window menu in Normal, Insert, and Terminal Insert modes.

  • The old Ctrl-w is then passed to terminal programs.
  • The new key is taken from them. Ctrl-a, for example, is tmux’s usual prefix and readline’s beginning-of-line.

A new leader also becomes the key that dismisses modal lists, choice popups, action menus, ordinary confirmations, and an empty picker.

  • A bare Space becomes ordinary input there.
  • Confirmations that ask you to type exact text, such as a branch name or a path, still treat every printable key, including the leader, as text.