I want to write a program that can monitor for a global keyboard event. However, I have no idea how to implement this on a Linux-based system. Anyone know how to get started?
Do you want it in a background process or in a GUI? See if this link help you. link to python's curses. It has a list of Key constant you can listen to. And there here is this talks about terminal io module (noncanonical mode in specific). If you provide more detail on what you want to do, maybe we can help you more too.
I wish to capture all the keyboard events in other windows. So it can be a background process or GUI. I encountered this problem when I'm writing a game with pygame recently, which obviously can't capture any key events once it lose focus.
Key constantyou can listen to. And there here is this talks about terminal io module (noncanonical mode in specific). If you provide more detail on what you want to do, maybe we can help you more too.