From 3cc1581bf4cb27f4c0a7baf9511c49ad10cb45d8 Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Sun, 27 Jan 2013 11:23:29 +0100 Subject: [Input] Clear focus and key event when pressed return --- input.lua | 3 +++ 1 file changed, 3 insertions(+) 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) -- cgit v1.2.3-70-g09d2