I wrote this code on to observe the event of a keydown motion. The problem appears to be that when this script is run, certain programs will crash this program, spitting out
There's a pyhook for python3: https://github.com/Answeror/pyhook_py3k This bug has been fixed in this project.