Shift-Arrow keys working in KiTTY but not PuTTY for nested tmux configuration

kittyputtytmux

For years I have been using a different prefix key for nested instances on tmux. I use \ on my own server, but a for any other servers I connect to and start a nested tmux session.

I have found this trick which uses Shift+Arrow Keys to switch between windows and nested instances, which is much better.

However, it does not work when I am using PuTTY (using Windows) but it does when I use KiTTY. I cannot figure out why it is not working with PuTTY.

Ctrl+v, Arrow Keys returns the same codes in the terminal when using either programs.


EDIT:

Just after starting a bounty I have realized that Ctrl+v, SHIFT+Arrow Keys does actually come up with different codes.

PuTTY:

SHIFT+Left Arrow = ^[OD

SHIFT+Right Arrow = ^[OC

SHIFT+Up Arrow = ^[OA

SHIFT+Down Arrow = ^[OB

KiTTY:

SHIFT+Right Arrow = ^[[1;2D

SHIFT+Right Arrow = ^[[1;2C

SHIFT+Up Arrow = ^[[1;2A

SHIFT+Down Arrow = ^[[1;2B

So how do I change PuTTY so that it sends the same codes with SHIFT+Arrow Keys?

Best Answer

The answer is you can't, since this is a bug in PuTTY. This was discussed some time ago at stack - https://stackoverflow.com/questions/6202310/putty-shift-arrows

I had the similar problem with tmux and PuTTY, and I switched to KiTTY.

Related Question