Get Key Pressed

Signature

bool getKeyPressed(s32 key)

Description

Returns whether a given key is currently pressed (true) or not (false).

Arguments

Key

The input key that will be checked.

Example

Check If F5 Key Is Pressed

if input.getKeyPressed(input.key.KEY_F5) then
 --do something
end

Notes

For a list of all keys, you can view the input keys spreadsheet in Resources.

Last updated