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

learner404 at gmail.com learner404 at gmail.com
Fri Jun 16 04:37:23 EDT 2006


Hello,

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
perfectly:

" The pyHook library wraps the low-level mouse and keyboard hooks in
the Windows Hooking API for use in Python applications."
http://www.cs.unc.edu/~parente/tech/tr08.shtml

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. :)

learner404




More information about the Python-list mailing list