How to discover and search tmux key bindings?

By Romain Dorgueil

Short answer

Press prefix ? to browse every key binding, with a one-line note each, right inside tmux. From the shell:

tmux list-keys                    # every binding
tmux list-keys -N                 # only the ones with a readable note
tmux list-keys -T copy-mode-vi    # one specific key table
tmux list-commands                # syntax and flags of every command

Details

prefix ? runs list-keys -N: a scrollable list of every binding with a short note. It answers “what does this key do?” without leaving your session, and it is the first place to look before searching the man page.

list-keys prints the same table from the shell. Bindings live in named tables, and -T <table> limits the output to one of them. The ones you touch most are prefix (keys after your prefix), root (keys with no prefix), and copy-mode-vi / copy-mode (keys active while selecting text). So tmux list-keys -T copy-mode-vi is how you find out which key yanks or starts a selection.

list-commands is the other half. It prints the full syntax and flags of every tmux command, so it is the reference when you forget whether resizing a pane is -L or -x:

tmux list-commands | grep resize-pane
# resize-pane (resizep) [-DLMRTUZ] [-x width] [-y height] [-t target-pane] [adjustment]

Between list-keys for the keyboard and list-commands for the CLI, you rarely need to guess. These two are how every snippet on the tmux wiki page was checked.

Verified on tmux 3.2a.

Want to work together? Get in touch.

Related