From 6f29b485870c9fb5bdef0dea07c6a1a3ef52042e Mon Sep 17 00:00:00 2001 From: NiLuJe Date: Wed, 2 Nov 2022 20:52:24 +0100 Subject: [PATCH] ExternalKeyboards: Drop the startup FM workaround Unnecessary since 2db294d0b77a850b6a4f135065ce46ab4532bf73, as the delayed event takes care of our problem ;). --- plugins/externalkeyboard.koplugin/main.lua | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/plugins/externalkeyboard.koplugin/main.lua b/plugins/externalkeyboard.koplugin/main.lua index 5487b9070..cb8129c07 100644 --- a/plugins/externalkeyboard.koplugin/main.lua +++ b/plugins/externalkeyboard.koplugin/main.lua @@ -92,7 +92,6 @@ local ExternalKeyboard = WidgetContainer:extend{ original_device_values = nil, keyboard_fds = {}, connected_keyboards = 0, - startup = true, } function ExternalKeyboard:init() @@ -115,14 +114,8 @@ function ExternalKeyboard:init() role = USB_ROLE_HOST end if role == USB_ROLE_HOST then - -- NOTE: On startup, if the FM is not in classic mode, the coverbrowser plugin does a funky hostile takeover at runtime. - -- Delay our own stuff to make sure we affect the final widget. - if ExternalKeyboard.startup then - UIManager:nextTick(self.findAndSetupKeyboards, self) - ExternalKeyboard.startup = nil - else - self:findAndSetupKeyboards() - end + -- Sweep the full class/input sysfs tree to look for keyboards + self:findAndSetupKeyboards() end end