Listening to keyboard events without trapping them?
问题 I'm writing an command-line application which listens for Control key release events in X Windows and alerts another process when it detects them. Being new to GNU/Linux, I'd prefer avoiding to fumble with GCC and therefore I'm looking for a scripting-based solution. Since I know a bit of Python, it seemed natural to go for a Python-based solution, and after scavenging the Internet for examples and reading Python Xlib docs, I've put together this programs which works, but with a caveat: it