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.

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.

share|improve this question
add comment

1 Answer 1

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
share|improve this answer
1  
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 '12 at 20:26
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.