pyxhook is a library that allows you to listen for keyboard events on Linux