OnKeyDown
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) |
||
| Line 1: | Line 1: | ||
| + | {{lua-function|onKeyDown|}} | ||
| + | |||
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. | 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. | ||
Revision as of 16:44, 8 February 2014
onKeyDown()
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