Module keygrabber
awesome keygrabber API
Author:
Julien Danjou <julien@danjou.info> |
Copyright© 2008-2009 Julien Danjou
Functions
run (func) | Grab keyboard and read pressed keys, calling callback function at each key pressed. |
stop () | Stop grabbing the keyboard. |
Functions
- run (func)
-
Grab keyboard and read pressed keys, calling callback function at each key pressed. The callback function must return a boolean value: true to continue grabbing, false to stop. The function is called with 3 arguments: a table containing modifiers keys, a string with the key pressed and a string with either "press" or "release" to indicate the event type.
Parameters
- func: A callback function as described above.
- stop ()
- Stop grabbing the keyboard.