mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
mod: handle shift and alt key events in adjustKeyEvents()
This commit is contained in:
@@ -167,13 +167,9 @@ function SelectMenu:choose(ypos, height)
|
||||
end
|
||||
|
||||
local ev = input.waitForEvent()
|
||||
ev.code = adjustKeyEvents(ev)
|
||||
if ev.type == EV_KEY and ev.value == EVENT_VALUE_KEY_PRESS then
|
||||
ev.code = adjustFWKey(ev.code)
|
||||
if ev.code == KEY_SHIFT then
|
||||
Keys.shiftmode = true
|
||||
elseif ev.code == KEY_ALT then
|
||||
Keys.altmode = true
|
||||
elseif ev.code == KEY_FW_UP then
|
||||
if ev.code == KEY_FW_UP then
|
||||
prevItem()
|
||||
elseif ev.code == KEY_FW_DOWN then
|
||||
nextItem()
|
||||
@@ -205,12 +201,6 @@ function SelectMenu:choose(ypos, height)
|
||||
elseif ev.code == KEY_BACK then
|
||||
return nil
|
||||
end
|
||||
elseif ev.type == EV_KEY and ev.value == EVENT_VALUE_KEY_RELEASE
|
||||
and ev.code == KEY_SHIFT then
|
||||
Keys.shiftmode = false
|
||||
elseif ev.type == EV_KEY and ev.value == EVENT_VALUE_KEY_RELEASE
|
||||
and ev.code == KEY_ALT then
|
||||
Keys.altmode = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user