Class key

awesome key API

Furthermore to the classes described here, one can also use signals as described in signals.

Some signal names are starting with a dot. These dots are artefacts from the documentation generation, you get the real signal name by removing the starting dot.

Info:

  • Copyright: 2008-2009 Julien Danjou
  • Author: Julien Danjou <[email protected]>

Signals

.press
property::key
property::modifiers
.release

Tables

key.key Key object.

Methods

key:instances () Get the number of instances.
key:set_index_miss_handler (cb) Set a __index metamethod for all key instances.
key:set_newindex_miss_handler (cb) Set a __newindex metamethod for all key instances.


Signals

.press
property::key
property::modifiers
.release

Tables

key.key
Key object.

Fields:

  • key string The key to trigger an event.
  • keysym string Same as key, but return the name of the key symbol. It can be identical to key, but for characters like ‘.’ it will return ‘period’.
  • modifiers table The modifier key that should be pressed while the key is pressed. An array with all the modifiers. Valid modifiers are: Any, Mod1, Mod2, Mod3, Mod4, Mod5, Shift, Lock and Control.

Methods

key:instances ()
Get the number of instances.

Returns:

    The number of key objects alive.
key:set_index_miss_handler (cb)
Set a __index metamethod for all key instances.
  • cb function The meta-method
key:set_newindex_miss_handler (cb)
Set a __newindex metamethod for all key instances.
  • cb function The meta-method
generated by LDoc 1.4.6 Last updated 2017-03-19 21:33:58