How to change key binding for Tmux
9,382
You do indeed have the correct syntax for changing the command prefix in tmux. But unfortunately you cannot use the combination Ctrl+Alt as a command prefix. Both Ctrl and Alt are only used in combination with other keys, but never alone and never with each other. For example,
C-b
stands for Ctrl+BM-n
stands for Alt+N
Your attempt to bind M-C
actually means Alt+Shift+C (meta prefix with uppercase C). Similarly, C-M
would mean Ctrl+Shift+M.
In short, you have to combine Ctrl with some other key or Alt with some other key, not with each other.
Related videos on Youtube
Author by
Severin
Updated on September 18, 2022Comments
-
Severin over 1 year
I want to change the key binding in Tmux so I can use
Ctrl + Alt
instead of
Ctrl + B
This is my (unfortunately) not working try to do so.
unbind C-b set -g prefix M-C
What's wrong with this? I thought I followed the documentation for the keys.
-
Sina over 7 yearsNote: the config files do not come by default, you need to create /etc/tmux.conf for global config. If you have the global config then tmux will also look for personal config file at ~/.tmux.conf
-
-
seanmcl over 9 yearsA link to the reference would be helpful.