4

My current config for tmux is to use ` for prefix key

set-option -g prefix `

How can I change this to use the ALT key. Nothing else in combination.

1 Answer 1

4

The ALT key doesn't send a specific key code to the terminal; rather, it modifies the key code sent by another key when it is held down simultaneously. As such, the ALT key by itself cannot be used as the tmux prefix.

[Edit: As Keith points out, the following will technically work but will almost certainly not behave the way you like.]

One workaround might be to configure your local setup or terminal emulator to change the behavior of the ALT key, perhaps to act as the Escape key. Then the following could work:

set-option -g prefix Escape
2
  • 2
    I don't think that will work. Terminal special keys all send codes starting with Esc, so any of those will probably trigger some random tmux command.
    – Keith
    Jun 8, 2012 at 20:26
  • I guess the same is true for Win key as well which xev shows to be Super_L (the left one).
    – user373230
    Jun 3, 2017 at 18:55

You must log in to answer this question.

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