2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00

Bug Fix: DPad conflict on Kindle Keyboard (#12341)

* fix conflicting panning and content selection

* accurate keyboard info message
This commit is contained in:
David 2024-08-13 21:54:08 +01:00 committed by GitHub
parent 27e2efcbd2
commit 3450aaba99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 3 deletions

View File

@ -21,7 +21,7 @@ end
function ReaderPanning:onGesture() end
function ReaderPanning:registerKeyEvents()
if Device:hasKeyboard() then
if Device:hasKeyboard() and Device:hasDPad() and not Device:useDPadAsActionKeys() then
self.key_events = {
-- these will all generate the same event, just with different arguments
MoveUp = {

View File

@ -231,15 +231,21 @@ if Device:hasKeyboard() or Device:hasScreenKB() then
-- we use same pos. 4 as below so we are always above "keyboard apperance settings"
table.insert(sub_item_table, 4, {
text = _("Show virtual keyboard"),
help_text = _("Enable this setting to always display the virtual keyboard within a text input field. When a field is selected (in focus), you can temporarily toggle the keyboard on/off by pressing 'Shift' + 'Home'."),
help_text = _("Enable this setting to always display the virtual keyboard within a text input field. When a field is selected (in focus), you can temporarily toggle the keyboard on/off by pressing 'Shift' (or 'ScreenKB') + 'Home'."),
checked_func = function()
return G_reader_settings:nilOrTrue("virtual_keyboard_enabled")
end,
callback = function()
G_reader_settings:flipNilOrTrue("virtual_keyboard_enabled")
if G_reader_settings:isFalse("virtual_keyboard_enabled") then
local keyboard_infomessage
if Device:hasScreenKB() then
keyboard_infomessage = _("When a text field is selected (in focus), you can temporarily bring up the virtual keyboard by pressing 'ScreenKB' + 'Home'.")
else
keyboard_infomessage = _("When a text field is selected (in focus), you can temporarily bring up the virtual keyboard by pressing 'Shift' + 'Home'.")
end
UIManager:show(InfoMessage:new{
text = _("When a text field is selected (in focus), you can temporarily bring up the virtual keyboard by pressing 'Shift' + 'Home'.")
text = keyboard_infomessage
})
end
end,