lovr.keypressed

This callback is called when a key is pressed.

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

Arguments

NameTypeDescription
keyKeyCodeThe key that was pressed.
scancodenumberThe id of the key (ignores keyboard layout, may vary between keyboards).
repeatbooleanWhether the event is the result of a key repeat instead of an actual press.

Returns

Nothing

See also