code: def on_mouse_press(self, x: int, y: int, button, mods):
          
          if button in [1, 4]:
              self.example.mouse_press_event(
                  x, self.buffer_height - y,
                  1 if button == 1 else 2,
              )
docs: Handle mouse press events and forward to example window