Module key
Key functions
Functions
press(key) | Send a keypress. |
wait([key[, timeout]]) | Wait for a key to be pressed. |
Fields
last | The last key that was pressed. |
Functions
- press(key)
-
Send a keypress.
Parameters:
- key constants.KEY the key to press.
- wait([key[, timeout]])
-
Wait for a key to be pressed.
FIXME: while waiting for a key to be pressed, a task.yield() is performed, with identical limitations.
Parameters:
- key constants.KEY (optional)
- timeout int (milliseconds; 0 = wait forever) (optional)
Returns:
-
constants.KEY
the key that was pressed.