Detecting user activity in Python

Tim Lesher tim at
Wed Jul 9 20:00:53 CEST 2003

Stefan Behrens <stefan.behrens.usenet at> wrote in message news:<beh576$jec$1 at>...
> I rather doubt that such functionality is in Python itself, i.e.
> can be used platform independently. So in that case, has anyone
> examples of how to do that in native C++ for Windows and Linux?

For native windows, you can install a systemwide mouse hook and a
systemwide keyboard hook (in a .DLL).  When you receive a mouse or
keyboard message, reset a timer, then pass it to the next hook in the

You can get more information (and samples) from

More information about the Python-list mailing list