vitvly
vitvly

Reputation: 3638

Rebind window navigation keys in Tmux

I'd like to rebind previous-window and next-window Tmux commands to C-, and C-. respectively. By default they are bound to $prefix p and $prefix n.

How do i do that? I tried something like

bind -n C-, previous-window
bind -n C-. next-window

but it does not work.

Thanks!

Upvotes: 0

Views: 492

Answers (1)

Random832
Random832

Reputation: 39060

Not every key can be used with the ctrl modifier in the terminal. The only keys with ctrl-characters are letters and the set @[\]^_? - these same characters are also available on most keyboards with Ctrl-2345678 (for the same characters in the same order; this places C-@ on Ctrl-2 and C-^ on Ctrl-6), Ctrl-/ and Ctrl-- for C-_, and backspace for C-?.

You may be able to set up your terminal emulator to send unique codes for these keys.

Upvotes: 1

Related Questions