Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In tmux, is it possible to bind forward slash to a command? The command I want to create is below:

bind-key -nr C-M-/ kill-window \; next-window

This config errors with: /home/joe/.tmux.conf:42: unknown key: C-M-/

The command works if I use a letter instead of a forward slash. I want to use forward slash to mirror my emacs config.

Update: Doesn't look like it's possible. According to the man page, only certain keys are white-listed. The relevant section from the man page:

Key Bindings

tmux allows a command to be bound to most keys, with or without a prefix key. 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 (Page Up), PPage (Page Down), Space, and Tab. Note that to bind the ‘"’ or ‘’’ keys, quotation marks are necessary, for example:

share|improve this question
add comment

1 Answer

In .tmux.conf, use: set-option -g prefix 'C-\'

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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