Mouse Motion Callback

property Window.mouse_motion_callback: callable

Callback executed when the mouse moves.

The callback function receives the position of the mouse.

def mouse_motion_callback(xpos: float, ypos: float) -> None:
    # code here
Raises
  • TypeError – callback must be callable

  • ValueError – callback function must take 2 arguments

Return type

callable