mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
add two finger swipe gestures for showing TOC and bookmarks
two_finger_swipe to east is for TOC two_finger_swipe to west is for bookmarks
This commit is contained in:
@@ -18,11 +18,26 @@ local ReaderBookmark = InputContainer:new{
|
||||
function ReaderBookmark:init()
|
||||
if Device:hasKeyboard() then
|
||||
self.key_events = {
|
||||
ShowToc = {
|
||||
ShowBookmark = {
|
||||
{ "B" },
|
||||
doc = _("show bookmarks") },
|
||||
}
|
||||
end
|
||||
if Device:isTouchDevice() then
|
||||
self.ges_events = {
|
||||
ShowBookmark = {
|
||||
GestureRange:new{
|
||||
ges = "two_finger_swipe",
|
||||
range = Geom:new{
|
||||
x = 0, y = 0,
|
||||
w = Screen:getWidth(),
|
||||
h = Screen:getHeight(),
|
||||
},
|
||||
direction = "west"
|
||||
}
|
||||
},
|
||||
}
|
||||
end
|
||||
self.ui.menu:registerToMainMenu(self)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user