bind tmux prefix to OS X cmd key (or any other binding)

Posted by rubenfonseca on Super User See other posts from Super User or by rubenfonseca
Published on 2011-03-19T15:33:49Z Indexed on 2011/03/19 16:12 UTC
Read the original article Hit count: 310

Filed under:
|
|

Hi all. I'm used to iTerm2 (or Terminal.app for this case) on OS X. But I want to move to use tmux (or screen, but the problem is similar to both apps).

So my idea is to have a single iTerm tab with a tmux session opened with multiple tabs. To do the transition I have a basic feature I need to configure on tmux: switch the the tab 'n' by using cmd + n (like Firefox, Chrome, iTerm2 itself, etc)

However I can't find a way of mapping the cmd key on the mac keyboard. I first tried to implement cmd as a prefix key, with no success. I've tried setting

set-option -g prefix M-a (hoping for Meta-a)

set-option -g prefix ^a (hoping for ^ to work)

but nothing works. Is this possible? I don't really need to bind the prefix to cmd, but I want to be able to change tmux tabs with cmd+n.

Thank you

© Super User or respective owner

Related posts about osx

Related posts about keyboard