[Input] Clear focus and key event when pressed return
This commit is contained in:
parent
e5c9e7e29f
commit
3cc1581bf4
1 changed files with 3 additions and 0 deletions
|
@ -64,6 +64,9 @@ return function(w)
|
||||||
elseif keyboard.key == 'end' then
|
elseif keyboard.key == 'end' then
|
||||||
w.info.cursor = w.info.text:len()
|
w.info.cursor = w.info.text:len()
|
||||||
-- info
|
-- info
|
||||||
|
elseif keyboard.key == 'return' then
|
||||||
|
keyboard.clearFocus()
|
||||||
|
keyboard.pressed()
|
||||||
elseif keyboard.code >= 32 and keyboard.code < 127 then
|
elseif keyboard.code >= 32 and keyboard.code < 127 then
|
||||||
local left = w.info.text:sub(1,w.info.cursor)
|
local left = w.info.text:sub(1,w.info.cursor)
|
||||||
local right = w.info.text:sub(w.info.cursor+1)
|
local right = w.info.text:sub(w.info.cursor+1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue