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?

2
  • Please review your keyboard settings and advise if you're using a nonstandard config. the.earth.li/~sgtatham/putty/0.58/htmldoc/… Commented Jun 16, 2016 at 20:57
  • This just happened to me again, 3 years later, the next time I spun up a new DO droplet. Weird! Commented Nov 7, 2019 at 11:51

1 Answer 1

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.

2
  • 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. Commented Jun 16, 2016 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. Commented Jun 16, 2016 at 23:28

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.