capturing ESC, page up/down in Python

Terry Reedy tjreedy at udel.edu
Mon Oct 27 00:49:30 EDT 2008


> jordilin <jordilin at gmail.com> wrote:
>> Is there any way to capture the keyboard events ESC, page up (next
>> page), page down (previous page) in Python?. I mean, how can I capture
>> if user presses one of those keys in a terminal based application? I
>> was thinking about pygame.key.get_pressed from the pygame module, but
>> I don't feel really happy about importing pygame in a non related game
>> project.

Much of Pygame is a wrapper for the SDL library.  Would you be happier 
using that part if it had been called PySDL?




More information about the Python-list mailing list