support pressed or repeating keys

This commit is contained in:
Dobrica Pavlinusic
2012-04-27 20:37:07 +02:00
parent 6dcd849515
commit 6a479aee80

View File

@@ -1792,7 +1792,7 @@ function UniReader:inputLoop()
while 1 do
local ev = input.saveWaitForEvent()
ev.code = adjustKeyEvents(ev)
if ev.type == EV_KEY and ev.value == EVENT_VALUE_KEY_PRESS then
if ev.type == EV_KEY and ev.value ~= EVENT_VALUE_KEY_RELEASE then
local secs, usecs = util.gettime()
keydef = Keydef:new(ev.code, getKeyModifier())
debug("key pressed:", tostring(keydef))