lovr.keypressed

This callback is called when a key is pressed.

function lovr.keypressed(key, scancode, repeating)
  -- your code here
end

Arguments

NameTypeDescription
keyKeyCode The key that was pressed.
scancodenumber The id of the key (ignores keyboard layout, may vary between keyboards).
repeatingboolean Whether the event is the result of a key repeat instead of an actual press.

Returns

Nothing

See also