1
I’m trying to use the getch
from python to grab the key the user pressed, but without me pressing anything it is returning "b'\xff'
", and if I use ord(getch())
, it returns 255. If you can help me thank.
from msvcrt
import getch key = msvcrt.getch()
print(getch())
if key == 0:
quit()
elif key == 1:
print("Game inicado")
else:
print('Opção invalida!')
Add your code so we can reproduce the error and help you ;)
– leofontes