The static class that handles input data from the keyboard and gamepads.
Members
-
The time of the last input in milliseconds.
-
The four direction value as a number of the numpad, or 0 for neutral.
-
The eight direction value as a number of the numpad, or 0 for neutral.
-
A hash table to convert from a gamepad button to a mapped key name.
-
A hash table to convert from a virtual key code to a mapped key name.
-
The interval of the key repeat in frames.
-
The wait time of the key repeat in frames.
Methods
-
Clears all the input data.
-
Initializes the input system.
-
Checks whether a key is kept depressed.
Name Type Description keyName
string The mapped name of the key.
Returns:
Type Description boolean True if the key is long-pressed. -
Checks whether a key is currently pressed down.
Name Type Description keyName
string The mapped name of the key.
Returns:
Type Description boolean True if the key is pressed. -
Checks whether a key is just pressed or a key repeat occurred.
Name Type Description keyName
string The mapped name of the key.
Returns:
Type Description boolean True if the key is repeated. -
Checks whether a key is just pressed.
Name Type Description keyName
string The mapped name of the key.
Returns:
Type Description boolean True if the key is triggered. -
Updates the input data.