lovr.system.wasKeyPressed
EditReturns whether a key on the keyboard was pressed this frame.
pressed = lovr.system.wasKeyPressed(...)Arguments
| Name | Type | Description |
| ... | KeyCode | The set of keys to check. |
Returns
| Name | Type | Description |
| pressed | boolean | Whether any of the specified keys were pressed this frame. |
Notes
Technically this returns whether the key was pressed between the last 2 calls to lovr.system.pollEvents, but that function is called automatically at the beginning of each frame in lovr.run, so it all works out!