Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple tmux prefix key combos?

Tags:

tmux

I've got tmux setup just the way I like it, and my chosen key of prefix is `, because it's so quick and easy to use.

Everything was gravy until I tried using tmux from my phone, which doesn't have a ` key. Is there anyway to additionally bind ^a to the prefix, so I can use BOTH combos at the same time?

like image 423
linked Avatar asked Apr 13 '12 21:04

linked


People also ask

How do I find the prefix key of tmux?

By default, tmux sets the prefix key as Ctrl + b.

What is CB in tmux?

tmux may be controlled from an attached client by using a key combination of a prefix key, 'C-b' (Ctrl-b) by default, followed by a command key. The default command key bindings are: C-b Send the prefix key (C-b) through to the application. C-o Rotate the panes in the current window forwards.


1 Answers

Starting with tmux 1.6, you can use the session option prefix2 to specify a second prefix key (e.g. in ~/.tmux.conf):

set-option -g prefix ` set-option -g prefix2 C-a 

Note: If you have any bindings or script that use the send-prefix, you can use its -2 option to send the key assigned to prefix2: send-prefix -2.

Prior to tmux 1.6, the prefix option accepted a comma-separated list of keys:

set-option -g prefix `,C-a 
like image 76
Chris Johnsen Avatar answered Sep 20 '22 22:09

Chris Johnsen