Input Tracker
Singleton object that tracks the state of mouse buttons and key presses. It listens for mouse button events and provides utility functions to check if a key or mouse button is currently pressed or was recently pressed.
Properties
Get the related CoroutineScope of receiver EventListener.
Extension property that checks if a key binding is pressed on either the keyboard or mouse.
Extension property that checks if a key binding is pressed on the keyboard.
Extension property that checks if a key binding is pressed on the mouse.
Returns whether the listenable is running or not, this is based on the parent listenable and if no parent is present, it will return the opposite of isDestructed.
Extension property that gets the time elapsed since the key binding was last pressed.
Functions
Children EventListener
Returns computed ReadWriteProperty based on the accumulator of specific event.
Gets the time elapsed since the specified keyboard key was last pressed.
Gets the time elapsed since the specified mouse button was last pressed.
Checks if the specified mouse button is currently pressed.
Parent EventListener
Remove cached scope and cancel it.
Registers an event hook for events of type T and launches a sequence
Start a Job on event.
Registers a repeatable sequence which repeats the execution of code on GameTickEvent.
Unregisters the event handler from the manager. This decision is FINAL! After the class was unregistered we cannot restore the handlers.
Checks if the specified keyboard key was pressed recently. Note: This requires manual tracking via updateKeyPress() since we don't have a keyboard event handler.
Checks if the specified mouse button was pressed recently.
Extension property that checks if a key binding was pressed recently.
Wrap the original interceptor and make it auto-detect the listener's running state at suspension to determine whether to resume the continuation.