[UX] Make the reader bottom menu compatible with key navigation (#3785)

* [toggleswitch] Add support for key navigation to this widget

Add the onFocus an onUnfocus event handler
add a new function that just circle the switch if not touch event is
detected

* Add key navigation to the readermenu

The shortcut is still Alt-gr on sdl, to be defined on Kindle

* Remove the old method of handling the Press key.

Now the event is handled by the main widget who implement focusmanager
and then dispatched to the currently focused item.
Modify the fine font tuning only for non touch-devices

See : https://github.com/koreader/koreader/pull/3785#issuecomment-375306466
This commit is contained in:
onde2rock
2018-03-22 21:01:38 +01:00
committed by Frans de Jonge
parent 7e6de30889
commit dfd87447da
9 changed files with 85 additions and 43 deletions

View File

@@ -14,7 +14,7 @@ function ReaderConfig:init()
if not self.dimen then self.dimen = Geom:new{} end
if Device:hasKeyboard() then
self.key_events = {
ShowConfigMenu = { { "AA" }, doc = "show config dialog" },
ShowConfigMenu = { {{"Press","AA"}}, doc = "show config dialog" },
}
end
if Device:isTouchDevice() then