Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

share|improve this answer

You must log in to answer this question.

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