Classes
Methods
keyDown(keyCode) → {boolean}
Checks if a specific key is currently held down.
Parameters:
| Name | Type | Description |
|---|---|---|
keyCode |
number | The key code to check. |
- Source:
Returns:
True if the key is down, false otherwise.
- Type
- boolean
keyHit(keyCode) → {boolean}
Checks if a specific key was newly pressed in the current frame.
This state is cleared at the end of the frame.
Parameters:
| Name | Type | Description |
|---|---|---|
keyCode |
number | The key code to check. |
- Source:
Returns:
True if the key was just hit, false otherwise.
- Type
- boolean