I am trying to use
bind-key -T root C-: command-prompt, but it is not working.
bind-key -T root M-: command-prompt works.
How can I use Ctrl+:, in other words Ctrl+Shift+; as a keybinding in tmux?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
The Shift key is not included as a default prefix key in tmux (see here).
However, there is a function called
user-keys. With this setting, you can define a custom escape sequence and bind that in tmux.
To test an escape sequence in Bash (as default), press Ctrl + V followed by the key sequence you want to test - it will then print the escape sequence.
However, for my terminal I get no valid escape sequence for Ctrl + :, which may also be the case for you.
But as an example let's take Alt + Home on my keyboard, which produces the escape sequence
\e[1;3H in tmux).
This could then be bound in tmux using:
set -s user-keys "\e[1;3H" bind -T root User0 command-prompt
I realize the above is only partly an answer, but however outlines an alternative method which can be used, if you can generate an escape sequence from a key combination.