Before you do anything else, the events you want to receive have to be
mousemask. You pass it a bit mask of events you
would like to listen. By default, all the events are turned off. The
ALL_MOUSE_EVENTS can be used to get all the events.
For current technology, the following events are of use.
|mouse button 1 down|
|mouse button 1 up|
|mouse button 1 clicked|
|mouse button 1 double clicked|
|mouse button 2 down|
|mouse button 2 up|
|mouse button 2 clicked|
|mouse button 2 double clicked|
|shift was down during button state change|
|control was down during button state change|
|alt was down during button state change|
|report all button state changes|
|report mouse movement|
There similar constants for mouse button #3 and #4.
There are some important things to note.
BUTTON_CTRLcodes will probably not work, as they will probably be intercepted by the window manager.