When I am editing a file in vim via SSH, I will try to use the number pad on my keyboard to enter long numbers (like IP addresses). Vim does not seem to like that very much. I am using PuTTY for Windows to SSH into a computer running Debian.

Pressing 123 enters me this regardless of if I am in insert mode or not:


When I use the "normal" (not number pad) number keys, everything works fine. What is going on here?

1 Answer 1


Your terminal (PuTTY) is configured to send escape sequences for keypad keys, rather than digits. This is called “application keypad mode” in Unix terminal terminology.

You can configure Vim to understand these escape sequences.

Alternatively, you can configure PuTTY to send digits. In the configuration, in the Keyboard panel, turn off application keypad mode. Alternatively, turn it off altogether in the Features panel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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