You are not logged in.

#1 2011-11-08 13:18:38

Forum Fellow
Registered: 2006-11-26
Posts: 5,819

Ctrl + arrow keys in tmux

I switched from screen to tmux a while ago and am very happy with it. However, there's a small problem I can't seem to solve: I can use ctrl+arrow keys to jump words in my normal terminal (and over SSH), but it does not work in tmux. I have tried changing the TERM variable (that's what Google search results recommend), but to no avail.

My .tmux.conf looks like this:

set-option -g prefix C-a
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@"

The last line is supposed to get ctrl+arrow behaviour working, but it doesn't seem to do anything. I tried tmux without both terminal-overrides lines commented out (both seperately and combined), but no dice. TERM value is xterm-256color, but setting it to term, screen, or screen-256color does not work.

How do I get this going?

Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy


#2 2011-11-08 13:36:46

Registered: 2010-05-06
Posts: 5,879

Re: Ctrl + arrow keys in tmux

Tmux doesn't pass through ctrl+key combinations, because you can set the combination to a tmux action. I've been dealing with this problem, since I started using tmux too. This might be worth a bug report.


#3 2012-05-21 02:03:26

Registered: 2012-05-21
Posts: 1

Re: Ctrl + arrow keys in tmux

"tmux set-window-option -g xterm-keys on" seems to help with Ctrl-arrow keys in bash (I'm on RHEL 6).  See also and … rrect_term


Board footer

Powered by FluxBB