Track keyboard and mouse usage
Simon Forman
rogue_pedro at yahoo.com
Sun Jul 23 20:34:16 EDT 2006
Dennis Lee Bieber wrote:
> On 17 Jul 2006 21:00:09 -0700, "dfaber" <deusfaber at gmail.com> declaimed
> the following in comp.lang.python:
>
> > Is there no clean method of accessing the keyboard device or the mouse
> > on linux?
> > It seems that looking at /proc/interrupts might prove to be useful for
> > keyboard monitoring. What about checking if the left mouse button is
> > clicked or finding the position of the cursor on the screen?
>
...
>
> I don't think anyone has ported raw X-protocol access to Python.
>
Actually someone did. http://python-xlib.sourceforge.net/ It's old
but it works fine. Speaks X protocol in pure python.
HTH,
~Simon
More information about the Python-list
mailing list