Right Click Callback

property Window.right_click_callback: callable

Callback executed when the right mouse button is clicked.

The callback function receives a bool representing if the mouse button was pressed.

def right_click_callback(pressed: bool) -> None:
    # code here
Raises
  • TypeError – callback must be callable

  • ValueError – callback function must take 1 argument

Return type

callable