Action generated when any mouse button is pressed or released. button_cb
takes a callback which accepts 5 arguments (button, state, x, y, status)
- button
-
the number of the button that changed, one of: BUTTON1 (left), BUTTON2 (middle), BUTTON3 (right)
- state
-
1 for 'pressed', 0 for 'released'
- x
-
x-coordinate
- y
-
y-coordinate
- status
-
status of the mouse buttons and some keyboard keys at the moment the event is generated.