lovr.keypressed
EditThis callback is called when a key is pressed.
function lovr.keypressed(key, scancode, isrepeat)
-- your code here
endArguments
| Name | Type | Description |
| key | KeyCode | The key that was pressed. |
| scancode | number | The id of the key (ignores keyboard layout, may vary between keyboards). |
| isrepeat | boolean | Whether the event is the result of a key repeat instead of an actual press. |
Returns
Nothing
Notes
By default this will be fired only once while a key is held down. This can be changed to fire multiple times by setting lovr.system.setKeyRepeat to true. In that case isrepeat will become true whenever the event is the result of a key repeat and false on a single press.