brandon w wrote:
How do I capture a key like the Space bar or the Enter key?
http://code.activestate.com/recipes/577977-get-single-keypress/
--
Steven
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
How do I capture a key like the Space bar or the Enter key? Is there
anything that comes in the default Python2.6.6 installation?
I have found something called termios doing a search. Should I just use
Pygame? I would like it to go cross platform if possible.
Brandon
On 04/01/12 18:28, brandon w wrote:
How do I capture a key like the Space bar or the Enter key?
It depends on your OS.
For Windows use msvcrt and the getch() function.
For other OS your best bet is curses.
See the Event Handling topic in my tutorial for examples
using both.
There is a