v2026.6.4
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.

JoyHatEvent

Joysticks hat event

Operations

GetHat #

Index of the hat that changed

method : public : GetHat() ~ Int

Return

TypeDescription
Inthat index

GetTimestamp #

Timestamp of the event

method : public : GetTimestamp() ~ Int

Return

TypeDescription
Intevent timestamp

GetType #

Event type

method : public : GetType() ~ Int

Return

TypeDescription
IntEventType->SDL_JOYHATMOTION

GetValue #

New position of the hat

method : public : GetValue() ~ JoystickHatValue

Return

TypeDescription
JoystickHatValuehat value

GetWhich #

Instance ID of the joystick that reported the event

method : public : GetWhich() ~ Int

Return

TypeDescription
Intjoystick ID