How does one apply a keystroke to console code without using Pygame's event checking system. I would prefer something that internalizes the loop and only requires a main running loop.
Asked
Active
Viewed 341 times
1 Answers
0
I'm fairly new to Python myself, but when I looked into the tkinter GUI framework I came across a way to make keystrokes perform commands.
Here's the detailed page regarding keyboard strokes, although you probably should read from earlier in the tutorial to get a hang on things: http://infohost.nmt.edu/tcc/help/pubs/tkinter/events.html#key-names
Here's a more detailed example: http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm
Also, this thread might be a different useful way to go about it: Python cross-platform listening for keypresses?