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:

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.

Fields

last
The last key that was pressed.
  • last int
generated by LDoc 1.4.3 Last updated 2018-12-23 23:12:04