SyntaxFix
Write A Post
Hire A Developer
Questions
For Windows you could use msvcrt like this:
msvcrt
import msvcrt while True: if msvcrt.kbhit(): key = msvcrt.getch() print(key) # just to show the result