pyHook equivalent on Linux ? (mouse and keyboard events without focus)

learner404 at learner404 at
Fri Jun 16 10:37:23 CEST 2006


I have a Windows Pyhon-Tk app which need to capture mouse end keyboard
events even when the app is not in focus.

On Windows so far I've used the excellent PyHook which does the job

" The pyHook library wraps the low-level mouse and keyboard hooks in
the Windows Hooking API for use in Python applications."

Is there something similar on Linux (I'm using Ubuntu/Kubuntu) ?

Should I go down down to the Windows Manager ? Can my Python-Tkinter
app communicate with KDE or Gnome to know and use these events ?

Any suggestions/leads would me much appreciated. :)


More information about the Python-list mailing list