magmax / python-readchar

Python library to read characters and key strokes
MIT License
143 stars 45 forks source link

Fixed Windows and Python 3.6 issues #28

Closed lwanger closed 6 years ago

lwanger commented 6 years ago

I made changes to readkey and readchar to work on Windows and Python 3 (particularly with encoding on Windows for Python 3.6). The keys sequences in readkey are mapped to the Linux/Mac strings so the key mappings are compatible between the two platforms.

The test program test.py shows how to use this. It echos the key code and exits when escape is hit.

Len