if Device:useDPadAsExtraButtons() then

pull/11749/head
SomeGuy 3 weeks ago committed by GitHub
parent fbcd112fd3
commit a49e04b517
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -61,7 +61,7 @@ function ReaderBookmark:onGesture() end
function ReaderBookmark:registerKeyEvents()
if Device:hasKeyboard() then
self.key_events.ShowBookmark = { { "B" } }
elseif Device:hasPageUpDownKeys() and Device:hasDPad() then
elseif Device:useDPadAsExtraButtons() then
self.key_events.ShowBookmark = { { "ScreenKB", "Left" } }
self.key_events.ToggleBookmark = { { "ScreenKB", "Right" } }
end

@ -246,7 +246,7 @@ function ReaderHighlight:registerKeyEvents()
self.key_events.QuickLeftHighlightIndicator = { { "Shift", "Left" }, event = "MoveHighlightIndicator", args = {-1, 0, QUICK_INDICATOR_MOVE} }
self.key_events.QuickRightHighlightIndicator = { { "Shift", "Right" }, event = "MoveHighlightIndicator", args = {1, 0, QUICK_INDICATOR_MOVE} }
self.key_events.StartHighlightIndicator = { { "H" } }
elseif Device:hasPageUpDownKeys() and Device:hasDPad() then
elseif Device:useDPadAsExtraButtons() then
local QUICK_INDICATOR_MOVE = true
self.key_events.QuickUpHighlightIndicator = { { "ScreenKB", "Up" }, event = "MoveHighlightIndicator", args = {0, -1, QUICK_INDICATOR_MOVE} }
self.key_events.QuickDownHighlightIndicator = { { "ScreenKB", "Down" }, event = "MoveHighlightIndicator", args = {0, 1, QUICK_INDICATOR_MOVE} }

@ -51,7 +51,7 @@ end
function ReaderPaging:onGesture() end
function ReaderPaging:registerKeyEvents()
if Device:hasPageUpDownKeys() and Device:hasDPad() then
if Device:useDPadAsExtraButtons() then
self.key_events.GotoNextPage = {
{ { "RPgFwd", "LPgFwd" } },
event = "GotoViewRel",

@ -116,7 +116,7 @@ end
function ReaderRolling:onGesture() end
function ReaderRolling:registerKeyEvents()
if Device:hasPageUpDownKeys() and Device:hasDPad() then
if Device:useDPadAsExtraButtons() then
self.key_events.GotoNextView = {
{ { "RPgFwd", "LPgFwd" } },
event = "GotoViewRel",
@ -139,7 +139,7 @@ function ReaderRolling:registerKeyEvents()
args = -1,
}
end
if Device:hasPageUpDownKeys() and Device:hasDPad() then
if Device:useDPadAsExtraButtons() then
self.key_events.ContentSelection = {
{ { "Up", "Down" } },
event = "ContentSelection",

@ -62,7 +62,7 @@ function ReaderToc:onGesture() end
function ReaderToc:registerKeyEvents()
if Device:hasKeyboard() then
self.key_events.ShowToc = { { "T" } }
elseif Device:hasPageUpDownKeys() and Device:hasDPad() then
elseif Device:useDPadAsExtraButtons() then
self.key_events.ShowToc = { { "ScreenKB", "Up" } }
end
end

Loading…
Cancel
Save