Event
Functions for managing user input events.
Poll
poll() → list[Event]Poll for all pending user input events.
This clears input states and returns a list of events that occurred since the last call.
Returns
list[Event] : A list of events that have occurred since the last call to poll().
New Custom
new_custom() → EventCreate a new custom event.
Returns
Event : The newly created custom event.
Push
push(event: Event) → NonePush a custom event onto the event queue.
Parameters
event: The custom event to push onto the queue.
Schedule
schedule(event: Event, delay_ms: int, repeat: bool) → NoneSchedule an event to be triggered after a delay. Calling this function on the same event again will replace its past schedule.
Parameters
event: The custom event to schedule.delay_ms: The delay in milliseconds before the event is triggered.repeat: Whether the event should be repeated.
Unschedule
unschedule(event: Event) → NoneUnschedule a previously scheduled event.
Parameters
event: The custom event to unschedule.
Start Text Input
start_text_input() → NoneStart text input for TEXT_INPUT and TEXT_EDITING events.
Use this to enable receiving text input events from the keyboard.
Stop Text Input
stop_text_input() → NoneStop text input for TEXT_INPUT and TEXT_EDITING events.
Use this to disable receiving text input events from the keyboard.