Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 5 down vote accepted

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.)

share|improve this answer
    
Thank you very much, it worked! –  Leonid Shevtsov Jun 21 '11 at 8:54
add comment

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

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

bind-key -n C-right next
bind-key -n C-left prev
share|improve this answer
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.