mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
support pressed or repeating keys
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user