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.

  • Note: 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 – wranvaud Dec 22 '16 at 18:30

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+B
  • M-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.

  • 4
    A link to the reference would be helpful. – seanmcl Nov 26 '14 at 15:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.