- Source
Example
// Check if the key with the keycode 65 (A) is pressed
KeyboardInput.IsKeyDown(KeyBoardInput.KEY_CODE.A);
Methods
(static) GetSpecialKeyPressed() → {number}
Returns the keycode of the special key pressed.
- Source
Returns:
The keycode of the special key pressed.
- Type:
- number
(static) IsKeyDown(keyCode) → {boolean}
Checks if the key with the given keycode is pressed.
Parameters:
Name | Type | Description |
---|---|---|
keyCode | KeyboardInput. | The keycode of the key to check. |
- Source
Returns:
True if the key with the given keycode is pressed.
- Type:
- boolean
Example