4

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.

1
  • 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, 2016 at 18:30

1 Answer 1

13

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.

1
  • 6
    A link to the reference would be helpful.
    – seanmcl
    Nov 26, 2014 at 15:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .