I'm looking at tmux from screen, and have hit a bump while configuring the (highly configurable!) tmux key bindings.

Problem is, in my .screenrc I have

bindkey ^[[d prev
bindkey ^[[c next
bindkey ^[[a title
bindkey ^[[b screen 1

and the bindings work (they originally came from rxvt-tabbedex).

But in tmux there's apparently no way to bind commands to ShiftLeft/Right combinations. Please prove me wrong.


Try this (as a partial example):

bind -n S-Right next-window
bind -n S-Left previous-window

That should be enough to make it easy to get the other 2 settings working too. It works on my tmux installation (1.4) but YMMV.

You can also use the meta key (option on Macs, alt on PCs):

bind-key -n M-Right next-window
bind-key -n M-Left previous-window 

If you're using Terminal.app in OS X you need to enable the use of the option key in the Preferences for that to work. (As far as I remember it works by default in iTerm, but if not it can definitely be enabled.)

| improve this answer | |

I don't know if you were in my situation (windows desktop using putty on linux server) but I have the same problem.

I solve this issue using MobaXterm instead of putty and using "classic bind-keys":

bind-key -n C-right next
bind-key -n C-left prev
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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