v2026.5.3
All Bundles
Bundle SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2.

JoyButtonEvent

Joysticks button event

Operations

GetButton #

Index of the button that changed

method : public : GetButton() ~ Int

Return

TypeDescription
Intbutton index

GetState #

State of the button

method : public : GetState() ~ KeyState

Return

TypeDescription
KeyStateKeyState->SDL_PRESSED or KeyState->SDL_RELEASED

GetTimestamp #

Timestamp of the event

method : public : GetTimestamp() ~ Int

Return

TypeDescription
Intevent timestamp

GetType #

Event type

method : public : GetType() ~ Int

Return

TypeDescription
IntEventType->SDL_JOYBUTTONDOWN or EventType->SDL_JOYBUTTONUP

GetWhich #

Instance ID of the joystick that reported the event

method : public : GetWhich() ~ Int

Return

TypeDescription
Intjoystick ID