Fix #7: Pressing return crashes Input.

Add arguments to call of keyboard.pressed() in input.lua.
Add sanity check to keyboard.pressed().
This commit is contained in:
Matthias Richter 2013-03-24 19:59:27 +01:00
parent ebe0ce2ac0
commit 43265a44ca
2 changed files with 6 additions and 2 deletions

View file

@ -63,7 +63,7 @@ return function(w)
-- info
elseif keyboard.key == 'return' then
keyboard.clearFocus()
keyboard.pressed()
keyboard.pressed('', -1)
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)