pygfx.objects.PointerEvent

class pygfx.objects.PointerEvent(*args, x, y, button=0, buttons=None, modifiers=None, ntouches=0, touches=None, pick_info=None, clicks=0, pointer_id=0, **kwargs)

Bases: Event

Mouse/Touch Event.

Parameters:
  • args (Any) – Positional arguments are forwarded to the base class.

  • x (int) – The x position of the cursor or touch in screen space (px).

  • y (int) – Thy y position of the cursor or touch in screen space (px).

  • button (int) – The integer value of the button being pushed.

  • buttons (str) – The string name of the button being pushed.

  • modifiers (list) – The modifiers that were pressed while the key was pressed.

  • ntouches (int) – The total number of synchronous touches.

  • touches (list) – A list of all currently occurring touches.

  • pick_info (dict) – Values of pickable fields. The exact content is specific to the WorldObject triggering the event.

  • clicks (int) – The total number of synchronous clicks.

  • pointer_id (Any) – The value set by set_pointer_capture().

  • kwargs (Any) – Additional keyword arguments are forward to the base class.

Notes

The values of this event follow the convention used by jupyter rfb. You can read about them here.