Skip to content

Scene Joystick Events

JoystickEvent

JoystickEvent(engine: Engine)

Bases: SceneEvent, CancellableEvent

Base joystick event implementation.

joystick property

joystick: int

The joystick that this event is associated with.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

cancel

cancel() -> None

Cancel this event from being further handled.

JoystickAxisMotionEvent

JoystickAxisMotionEvent(engine: Engine)

Bases: JoystickEvent

Dispatched when the scene recognizes movement in a joystick axis.

axis property

axis: int

The axis of motion in which the joystick moved.

position property

position: float

The new position of the joystick that moved.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

joystick property

joystick: int

The joystick that this event is associated with.

cancel

cancel() -> None

Cancel this event from being further handled.

JoystickButtonDownEvent

JoystickButtonDownEvent(engine: Engine)

Bases: JoystickEvent

Dispatched when the scene recognizes that a button has been pressed on a joystick.

button property

button: int

The button that was pressed.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

joystick property

joystick: int

The joystick that this event is associated with.

cancel

cancel() -> None

Cancel this event from being further handled.

JoystickButtonUpEvent

JoystickButtonUpEvent(engine: Engine)

Bases: JoystickEvent

Dispatched when the scene recognizes that a button has been released on a joystick.

button property

button: int

The button that was released.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

joystick property

joystick: int

The joystick that this event is associated with.

cancel

cancel() -> None

Cancel this event from being further handled.

JoystickDeviceAddedEvent

JoystickDeviceAddedEvent(engine: Engine)

Bases: JoystickEvent

Dispatched when the scene recognizes that a joystick device has been added to the system.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

joystick property

joystick: int

The joystick that this event is associated with.

cancel

cancel() -> None

Cancel this event from being further handled.

JoystickDeviceRemovedEvent

JoystickDeviceRemovedEvent(engine: Engine)

Bases: JoystickEvent

Dispatched when the scene recognizes that a joystick device has been removed from the system.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

joystick property

joystick: int

The joystick that this event is associated with.

cancel

cancel() -> None

Cancel this event from being further handled.

JoystickHatMotionEvent

JoystickHatMotionEvent(engine: Engine)

Bases: JoystickEvent

Dispatched when the scene recognizes that the hat of a joystick has moved.

hat property

hat: int

The ID of the hat that moved.

position property

position: IntVector2

The new position of the hat that moved.

engine property

engine: Engine

The engine that is handling this plugin and dispatched this event.

is_cancelled property

is_cancelled: bool

Check if this event has already been cancelled.

scene property

scene: Scene

The active scene that dispatched this event.

joystick property

joystick: int

The joystick that this event is associated with.

cancel

cancel() -> None

Cancel this event from being further handled.