Reading Keypress with Python

This works for windows.

However, you cannot use this feature from cygwin.  You need to invoke python script directly from Windows.  Double-clicking the python script works, but you need to catch exceptions in the case (otherwise, you don’t know what happened when an exception was raised).

Here is the sample program to read arrow keys.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.