Score:2

Remap tmux prefix shortcut of control b

ca flag

I tried to remap tmux prefix shortcut from control b to control / by

unbind-key C-b
set-option -g prefix C-/
bind-key C-/ send-prefix

but not fulfill the expectation, how is the correct way to accomplish it ?

Score:3
vn flag

From man tmux:

When specifying keys, most represent themselves (for example ‘A’ to ‘Z’). Ctrl keys may be prefixed with ‘C-’ or ‘^’, and Alt (meta) with ‘M-’.

In addition, the following special key names are accepted:

Up, Down, Left, Right, BSpace, BTab, DC (Delete), End, Enter, Escape, F1 to F20, Home, IC (Insert), NPage/PageDown/PgDn, PPage/PageUp/PgUp, Space, and Tab. Note that to bind the ‘"’ or ‘'’ keys, quotation marks are necessary [...]

As you can see, a number of special keys are allowed, but / isn't one of them. So it's simply a case of that particular key not being bindable in tmux.

Your configuration is correct, so if you wanted to make Ctrl+x the prefix key, this would work:

unbind-key C-b
set-option -g prefix C-x
bind-key C-x send-prefix

tmux also has an advanced feature called "user-keys", where custom escape sequences can be defined and bound, but I'm not sure it will help in this case, since / isn't an escape sequence.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.