OnKeyDown
(Difference between revisions)
(Created page with "Check if key has been pressed. While isKeyPressed will return "true" continuously until a key is released, this function will return "true", when the button is pressed dow...") |
Dahnielson (Talk | contribs) |
||
Line 4: | Line 4: | ||
You can find key constants [http://wiki.maratis3d.org/index.php?title=Keys here] | You can find key constants [http://wiki.maratis3d.org/index.php?title=Keys here] | ||
+ | |||
+ | [[Category:Lua scripting]] |
Revision as of 19:07, 4 February 2014
Check if key has been pressed. While isKeyPressed will return "true" continuously until a key is released, this function will return "true", when the button is pressed down and then "true","false" every few ticks depending on your OS key delay and speed settings.
spaceDown = onKeyDown("SPACE")
You can find key constants here