2009-08-20 16:18:52 +02:00
|
|
|
--- awesome keygrabber API
|
|
|
|
-- @author Julien Danjou <julien@danjou.info>
|
|
|
|
-- @copyright 2008-2009 Julien Danjou
|
|
|
|
module("keygrabber")
|
|
|
|
|
|
|
|
--- 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
|
2009-08-30 06:20:52 +02:00
|
|
|
-- string with either "press" or "release" to indicate the event type.
|
2009-08-20 16:18:52 +02:00
|
|
|
-- @param func A callback function as described above.
|
|
|
|
-- @name run
|
|
|
|
-- @class function
|
|
|
|
|
|
|
|
--- Stop grabbing the keyboard.
|
|
|
|
-- @param -
|
|
|
|
-- @name stop
|
|
|
|
-- @class function
|