Set kLFT5 and kRIT5 in your external terminfo entry (outside tmux) or
with terminal-overrides to whatever your terminal generates for C-Left
and C-Right. For example, xterm has these:

kLFT5=\E[1;5D, kRIT5=\E[1;5C

Then tmux should pass \eOD and \eOC. If you want full xterm-style
modifiers set the xterm-keys option.


On Wed, Oct 24, 2012 at 11:05:20PM +0000, ZeWaren / Erwan Martin wrote:
> Hi list,
> 
> I'm mostly using tmux remotely on servers using putty (xterm terminal).
> 
> I managed to bind the ctrl+left and ctrl+right combos to do some 
> specific actions on my shells (bash, tcsh and zsh), using some 
> configuration like:
> 
> "\eOD": backward-word
> "\eOC": forward-word
> 
> My problem is that inside tmux, pressing ctrl+arrows does not generate 
> ^[OD and ^[OC, but rather ^[[C and ^[[D, which is the same codes you 
> get pressing the arrows alone.
> 
> I've found that in tty-keys.c, the codes are bound to KEYC_RIGHT and 
> KEYC_LEFT, with the TTYKEY_RAW flag. I understood this flag forces the 
> string to be always interpreted by tmux as the corresponding key.
> 
> I tried editing the source code and overriding the terminfo database 
> (^[OD and ^[OC are bound to kcuf1 and kcub1 by default), and then my 
> combos were working.
> 
> Is there another way of achieving the same thing without interfering 
> with the source code? Did I understand something wrong?
> 
> --
> ZeWaren / Erwan Martin
> 
> 
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to