From 4e973dacb07b592d9a32af505a1c20c6e84f7fd6 Mon Sep 17 00:00:00 2001 From: Commodore64user <97603719+Commodore64user@users.noreply.github.com> Date: Sun, 15 Nov 2026 19:43:59 +0000 Subject: [PATCH] ReaderKeySelection: clear highlight indicator during keyboard connection/disconnection --- frontend/apps/reader/modules/readerkeyselection.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/apps/reader/modules/readerkeyselection.lua b/frontend/apps/reader/modules/readerkeyselection.lua index f4898988b..3c81817a4 100644 --- a/frontend/apps/reader/modules/readerkeyselection.lua +++ b/frontend/apps/reader/modules/readerkeyselection.lua @@ -210,7 +210,17 @@ function ReaderKeySelection:registerKeyEvents() end end ReaderKeySelection.onRegisterDPadEvents = ReaderKeySelection.registerKeyEvents -ReaderKeySelection.onPhysicalKeyboardConnected = ReaderKeySelection.init + +function ReaderKeySelection:onPhysicalKeyboardConnected() + self:stopHighlightIndicator(true) + self:init() +end + +function ReaderKeySelection:onPhysicalKeyboardDisconnected() + -- A dropped connection leaves the overlay up and + -- unreachable even on further connections. + self:stopHighlightIndicator(true) +end function ReaderKeySelection:addToMainMenu(menu_items) if not Device:useDPadAsActionKeys() and not Device:isTouchDevice() then