[UX] Implement hasFewKeys prototype (#6195)
This is a quick exploration into how the new Device:hasFewKeys() method could work to make things more usable on very limited devices. In the reader, the right is repurposed to open the menu. Left in turn closes it. The same principle is applied to ButtonDialog. This means you can select anything in principle, but once you go right you can't go back. References <https://github.com/koreader/koreader/issues/4029>.
This commit is contained in:
1 parent
879f8a7624
commit
4a65cc666b
7 files changed
+23
-2
No files matched your search
@@ -52,6 +52,10 @@ function ReaderPaging:init()
|
||||
{ { "RPgBack", "LPgBack", "Left" } }, doc = "go to previous page",
|
||||
event = "GotoViewRel", args = -1,
|
||||
}
|
||||
if Device:hasFewKeys() then
|
||||
table.remove(self.key_events.GotoNextPage[1][1], 3) -- right
|
||||
table.remove(self.key_events.GotoPrevPage[1][1], 3) -- left
|
||||
end
|
||||
self.key_events.GotoNextPos = {
|
||||
{ {"Down" } }, doc = "go to next position",
|
||||
event = "GotoPosRel", args = 1,
|
||||
|
||||
Reference in new issue
Block a user