2018-07-24 23:13:36 +02:00
|
|
|
-- Needed for root.fake_inputs
|
|
|
|
local keygrabber = {_current_grabber = nil}
|
2016-12-30 07:00:20 +01:00
|
|
|
|
2018-07-24 23:13:36 +02:00
|
|
|
local function stop()
|
|
|
|
keygrabber._current_grabber = nil
|
|
|
|
end
|
|
|
|
|
|
|
|
local function run(grabber)
|
|
|
|
keygrabber._current_grabber = grabber
|
|
|
|
end
|
2016-12-30 07:00:20 +01:00
|
|
|
|
2018-07-24 23:13:36 +02:00
|
|
|
keygrabber = {
|
|
|
|
run = run,
|
|
|
|
stop = stop,
|
|
|
|
isrunning = function() return keygrabber._current_grabber ~= nil end,
|
|
|
|
}
|
2016-12-30 07:00:20 +01:00
|
|
|
|
|
|
|
return keygrabber
|
|
|
|
|
|
|
|
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|