mirror of
https://github.com/airstruck/luigi.git
synced 2026-01-09 15:58:22 +00:00
@@ -266,6 +266,8 @@ end
|
|||||||
-- Special keys.
|
-- Special keys.
|
||||||
local function createDefaultKeyActions (self)
|
local function createDefaultKeyActions (self)
|
||||||
return {
|
return {
|
||||||
|
-- let tab press propagate
|
||||||
|
['tab'] = function () return true end,
|
||||||
-- dummy functions to trap events
|
-- dummy functions to trap events
|
||||||
['return'] = function () end,
|
['return'] = function () end,
|
||||||
['space'] = function () end,
|
['space'] = function () end,
|
||||||
@@ -377,9 +379,10 @@ This color is used to indicate the selected range of text.
|
|||||||
self:onKeyPress(function (event)
|
self:onKeyPress(function (event)
|
||||||
local act = self.keyActions[event.key]
|
local act = self.keyActions[event.key]
|
||||||
if act then
|
if act then
|
||||||
act()
|
local result = act()
|
||||||
return false
|
if result then return true end
|
||||||
end
|
end
|
||||||
|
return false
|
||||||
end)
|
end)
|
||||||
|
|
||||||
self:onDisplay(function (event)
|
self:onDisplay(function (event)
|
||||||
|
|||||||
Reference in New Issue
Block a user