Python: msvcrt.getch() returns wrong string

484 views Asked by At

I'd like to receive a keyboard input, but getch() doesn't return what I want. It always returns ÿ even if I don't press anything. Do you know why? My Script:

from msvcrt import getch
while 1:
     print( chr( getch()[0] ) )
0

There are 0 answers