aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Richter <vrld@vrld.org>2013-01-27 11:23:29 +0100
committerMatthias Richter <vrld@vrld.org>2013-01-27 11:23:29 +0100
commit3cc1581bf4cb27f4c0a7baf9511c49ad10cb45d8 (patch)
tree5b53775de02790dbc5d60530e93c77d1077dc4f7
parente5c9e7e29fd34271522a4ed7dfc6b8b8ee6670cd (diff)
downloadQuickie-3cc1581bf4cb27f4c0a7baf9511c49ad10cb45d8.tar.gz
Quickie-3cc1581bf4cb27f4c0a7baf9511c49ad10cb45d8.tar.bz2
Quickie-3cc1581bf4cb27f4c0a7baf9511c49ad10cb45d8.tar.xz
Quickie-3cc1581bf4cb27f4c0a7baf9511c49ad10cb45d8.zip
[Input] Clear focus and key event when pressed return
-rw-r--r--input.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/input.lua b/input.lua
index 87d980e..ccace0d 100644
--- a/input.lua
+++ b/input.lua
@@ -64,6 +64,9 @@ return function(w)
elseif keyboard.key == 'end' then
w.info.cursor = w.info.text:len()
-- info
+ elseif keyboard.key == 'return' then
+ keyboard.clearFocus()
+ keyboard.pressed()
elseif keyboard.code >= 32 and keyboard.code < 127 then
local left = w.info.text:sub(1,w.info.cursor)
local right = w.info.text:sub(w.info.cursor+1)