Insert when in xterm, gives ^[[2~
and,
Shift+Insert gives ^[[2;1~
All this is good until I start tmux.
Note that the $TERM
variable remains the same, so this issue should not be related to terminfo.
Tmux when in xterm is not able to distinguish between Insert and Shift+Insert and both are read as ^[[2~
. Not only xterm, but tmux when started in a virtual console, exhibits the same behaviour.
I tried with and without set -g xterm-keys on
in the tmux conf file, but to no avail. FWIW I am running tmux 1.8 on XTerm(296) and these are the overrides in my .Xresources
XTerm*VT100.Translations: #override \
Shift<Key>Insert: string("\033[2;1~") \n\
<Key>Insert: string("\033[2~")
This is really a pain because I want to map Shift+Insert in vim but can't do it in tmux.
Interestingly, when I run GNU screen in the same xterm, it easily distinguishes between Insert and Shift+Insert. I'm starting to believe it's some wickedness in tmux and not my setup.
Does anyone know how to make tmux get the keys transparently just like how xterm gets it without mangling it up in the middle or is there something I am doing wrong?
.Xresources
?