aboutsummaryrefslogtreecommitdiffstats
path: root/keyboard.lua
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard.lua')
-rw-r--r--keyboard.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/keyboard.lua b/keyboard.lua
index 50323ff..4850df3 100644
--- a/keyboard.lua
+++ b/keyboard.lua
@@ -70,6 +70,10 @@ local function makeCyclable(id)
lastwidget = id
end
+local function pressedOn(id, k)
+ return (k or 'return') == key and hasFocus(id) and k
+end
+
local function beginFrame()
-- for future use?
end
@@ -88,6 +92,7 @@ return setmetatable({
clearFocus = clearFocus,
hasFocus = hasFocus,
makeCyclable = makeCyclable,
+ pressedOn = pressedOn,
disable = disable,
enable = clearFocus,