Skip to content
pepijndevos edited this page Sep 13, 2010 · 3 revisions

Since PyMouse 1.0 it’s possible to receive mouse events in your application.

The API works by extending PyMouseEvent and overwriting one or both of the click() and move() methods.
PyMouseEvent extends Thread to do its work while your app runs, you’ll have to call start() and stop() to respectively start and stop the event system.

An example:

the capture instance variable can be set to True or False to either listen or capture mouse events.

Warning: If capture is set to True, the mouse becomes unusable to other applications, and only your app will receive them.

Clone this wiki locally