Module tetra::input

source ·
Expand description

Functions and types relating to handling user input (e.g. keyboards, mice, gamepads).

Enums

Represents a key on the player’s keyboard.
Represents a button on the player’s mouse.

Functions

Returns an iterator of the keys that are currently down.
Returns an iterator of the keys that were pressed this tick.
Returns an iterator of the keys that were released this tick.
Get the position of the mouse.
Get the X co-ordinate of the mouse.
Get the Y co-ordinate of the mouse.
Returns the text that the user entered this tick. This will match the user’s keyboard and OS settings.
Returns true if the specified key is currently down.
Returns true if the specified key was pressed this tick.
Returns true if the specified key was released this tick.
Returns true if the specified key is currently up.
Returns true if the specified mouse button is currently down.
Returns true if the specified mouse button was pressed this tick.
Returns true if the specified mouse button was released this tick.
Returns true if the specified mouse button is currently up.