When I SSH in to our server, control + arrow sequences are working fine for me: Ctrl + V then Ctrl + up, down, right, left gives ^[OA
, ^[OB
, ^[OC
, and ^[OD
respectively. In tmux, I get ^[[A
, ^[[B
, ^[[C
, and ^[[D
.
I'm connecting to Ubuntu via PuTTY, but…
I have the correct terminal set (
putty
becausencurses-term
is installed). All other key combinations are working in the main shell.I'm using the right character set (UTF-8).
I'm definitely getting a 256-colour terminal (I've tried multiple invocations of
TERM=... tmux
)I've read the tmux FAQs that say to use this config:
set -g terminal-overrides "xterm*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@"
making my config like so:
set -g default-terminal "screen-256color"
set -g terminal-overrides "screen*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:smkx@:rmkx@"
set-window-option -g xterm-keys on
since screen
was recommended elsewhere (though I tried putty
there, too.
The only thing I've found that worked is running tput rmkx
within tmux
, but I don't know if that's the correct solution, what other effects it has, if other programs will change this setting, or even how it should be set correctly in .tmux.conf
so that I don't have to type it in manually all the time.