From 698fc35c3f1a10233cf69085a87fb912e2f79841 Mon Sep 17 00:00:00 2001 From: David <97603719+Commodore64user@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:01:27 +0100 Subject: [PATCH] Minor keyboard corrections (#12372) --- frontend/ui/widget/inputdialog.lua | 2 +- frontend/ui/widget/inputtext.lua | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/ui/widget/inputdialog.lua b/frontend/ui/widget/inputdialog.lua index dbe738ef3..14b41bbf3 100644 --- a/frontend/ui/widget/inputdialog.lua +++ b/frontend/ui/widget/inputdialog.lua @@ -222,7 +222,7 @@ function InputDialog:init() if self.fullscreen or self.add_nav_bar then self.deny_keyboard_hiding = true end - if (Device:hasKeyboard() or Device:hasScreenKB()) and G_reader_settings:isFalse("virtual_keyboard_enabled") then + if (Device:hasKeyboard() or Device:hasScreenKB()) and G_reader_settings:isFalse("virtual_keyboard_enabled") then self.keyboard_visible = false self.skip_first_show_keyboard = true end diff --git a/frontend/ui/widget/inputtext.lua b/frontend/ui/widget/inputtext.lua index c6849bd58..0e92b1086 100644 --- a/frontend/ui/widget/inputtext.lua +++ b/frontend/ui/widget/inputtext.lua @@ -655,6 +655,8 @@ function InputText:onKeyPress(key) else handled = false end + -- This primarily targets Kindle. When a virtual keyboard is shown on screen, mod+dpad allows controlling the cursor, as dpad alone + -- (see previous ‘if’) is now occupied handling the virtual keyboard. if not handled and (key["ScreenKB"] or key["Shift"]) then handled = true if key["Back"] and Device:hasScreenKB() then @@ -685,6 +687,7 @@ function InputText:onKeyPress(key) end end if not handled and Device:hasSymKey() then + handled = true local symkey = sym_key_map[key.key] -- Do not match Shift + Sym + 'Alphabet keys' if symkey and key.modifiers["Sym"] and not key.modifiers["Shift"] then