Module core.key

T-Engine key API

Functions

modState (mod) Check if a modifier key is being pressed.
set_current_handler (handler) Sets the Lua keyboard handler.


Functions

modState (mod)
Check if a modifier key is being pressed.

Parameters

  • mod: The modifier to check for: "ctrl", "shift", "alt" or "meta".

Return value:

A boolean telling whether the modifier is pressed (true) or not (false).
set_current_handler (handler)
Sets the Lua keyboard handler. The keyboard events are then collected by the C core and passed to handler.

Parameters

  • handler: The Lua handler object.

Valid XHTML 1.0!