2

I am connecting to a Debian virtual machine using PuTTY, and every time I press the 0 (zero) key, the command line behaves as if I've pressed enter. Why might this be and how can I change it?

Perhaps also relevant: I'm connecting from Windows 10, using PuTTYtray, and have installed a custom keymap created using Microsoft Keyboard Layout Generator 1.4 (which leaves 0 alone but changes its shifted behaviour). The Debian machine is a DigitalOcean droplet. I've been using it for about a year and have never noticed anything like this.

Things I've tried:

  • Pressing 0 in other applications -- normal behaviour
  • Pressing 0 in other PuTTY sessions on other hosts -- normal behaviour
  • Trying another shell (bash instead of zsh) -- 0 still acts as enter
  • Disconnecting and reconnecting -- same behaviour
  • Keypad 0 -- also acts as enter
  • Shift and 0 -- works as expected (> on my keyboard)
  • Connecting to the problem host via another (Ubuntu) host -- 0 acts normally
  • Connecting to another host via the problem host -- even weirder! -- 0 acts as if I had pressed 0 THEN enter
  • GNU screen -- 0 still acts as enter

Any suggestions?

Dan
  • 123
  • 5
  • Please review your keyboard settings and advise if you're using a nonstandard config. http://the.earth.li/~sgtatham/putty/0.58/htmldoc/Chapter4.html#config-keyboard – Colyn1337 Jun 16 '16 at 20:57
  • This just happened to me again, 3 years later, the next time I spun up a new DO droplet. Weird! – Dan Nov 07 '19 at 11:51

1 Answers1

2

Sounds like maybe somehow you got

stty eol 0

into one of your profile scripts somehow. Try

stty sane

and see if that fixes it.

DerfK
  • 19,313
  • 2
  • 35
  • 51
  • On second thought... setting eol to 0 (or any other character) isn't causing this behavior in putty for me, which is strange because `stty erase 0` does set 0 to backspace. – DerfK Jun 16 '16 at 19:46
  • `stty sane` stops the crazy behaviour, but neither `ssty eol 0` nor `stty erase 0` then have any noticeable effect. Thanks for fixing my problem, but I still wonder exactly what caused it. – Dan Jun 16 '16 at 23:28