Does anyone here know how to get the +-*/ on the numerical keypad to work in GNU screen from putty?

Numbers work fine but not the operators. The / seems to be bind to rename the current shell or maybe start a new shell. My host OS is ubuntu 9.04 (the OS I run the screen on).

4 Answers 4


If you set the following in your .screenrc the numpad keys will work

termcapinfo xterm ks@:ke@

I don't know if this will change any other important settings you might be using, however, so it would be worth giving things a test.

It might be that there is a better setting string, but so far I haven't been able to find one.

I've been searching around looking through termcap, terminfo, terminfo/termcap and screen manuals, but it looks like no-one is having much luck with getting both the number pad and the arrow keys in ncurses apps to work at the same time (they still seem to work in non-ncurses apps).

The closest I've seen is from these threads. Someone spoke to one of the program maintainers regarding an almost identical problem, however as of the 10th of March the problem wasn't resolved.

  • Nice it worked :). Has to see if something else breaks but hopefully not.
    – Buzzzz
    May 29, 2009 at 10:17
  • Hm buy doing so the arrow keys stopped working in midknight commander and centerim..
    – Buzzzz
    May 29, 2009 at 10:47
  • Fixed it for me too, no issues in any apps so far.
    – red
    Dec 27, 2012 at 12:47

You can check the configuration, go to


--> Keyboard

     --> Function keys and keypad

Choose whichever works for you. Usually, Linux / Xterm R6

  • Well it works fine if I don't use screen. Looks like screen rebinds those keys for some reason.
    – Buzzzz
    May 29, 2009 at 8:06
  • same here @Buzzzz, but it does fix it for me. vim without screen, F1-12 keys work fine. under screen, i get: ^[[14something. Now, if i set my putty setting to "vt100+" (the linux setting did nothing) then i get F1-12 keys working on vim under screen.
    – gcb
    Nov 10, 2014 at 18:18

Another configuration that worked for me:

Go to: Putty configuration->Terminal->Features

Check the Disable application keypad mode check box.



As per Andy's response adding termcapinfo xterm ks@:ke@ to ~/.screenrc fixed the problem in the shell and the arrow keys do work.

However the arrow keys stopped working in VIM which for me replaced a problem with an even worse problem.

So I added instead to the ~/.screenrc

termcapinfo xterm* ks@:ke@:kl=\E[D:kd=\E[B:kr=\E[C:ku=\E[A

So far so good.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.