adewes/awesome-keyboard — pull request #1 by davidad (2014-03-12 22:58:41+00:00)
Title: Making it work on OSX

This is my first pull request ever, so I'm not really sure what I'm doing, but at least here's an example of how you _can_ make something like this work in OSX. It requires making the watcher the main thread and making pygame the subsidiary thread (the Cocoa API for monitoring keystrokes can only be called from a main thread), so almost all the code has changed. I've made an attempt to make the Xlib version still work, but I'm sure I've broken something.