I'm using putty > screen > vim, and screen is sending the same sequence for Ctrl+Right and Right in application mode for vim.

There is an option to make putty send the cursor mode sequences (disable application cursor keys mode) when in application mode and that works, but when screen is introduced, something isn't right.

How would I go about fixing this?

2 Answers 2


If I set term = xterm in putty, and term=putty in screenrc, it seems to work.


That only seems to work. As I pointed out (later than this question) in How to enable Control key combinations for GNU screen on putty?, the difference when you do not modify screenrc is that the terminal description for screen sets application mode for the terminal.

However, applications running in screen using this workaround can send escape sequences that screen does not recognize. Using

infocmp putty screen

to see, these include

hpa (horizontal position absolute),

vpa (vertical position absolute),

indn (index by a given number of lines), and

rin (reverse index by a given number of lines).

Not all applications will misbehave (i.e., those which do little optimization of the screen output will "work"), but ncurses would use those features.

However — since you have the putty terminal description available, that implies you have the full ncurses database. If you set


outside screen, then screen will use the terminal description screen.putty, which does what you want.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .