mirror of
https://github.com/koreader/koreader.git
synced 2026-11-29 08:42:31 +00:00
The externalkeyboard plugin was unconditionally disabled on Kindle because it gates on Kobo-specific OTG sysfs paths (ci_hdrc.0/role, usbc0/otg_role). However, the keyboard detection and hotplug handling machinery (findAndSetupKeyboards, onEvdevInputInsert, setupKeyboard) is already fully generic — it uses fbink_input which works on Kindle. With the companion koreader-base patch adding a uevent listener to input-kindle.h, EvdevInputInsert events now fire on Kindle when UHID devices are created (e.g., by kindle-hid-passthrough). This patch lets the plugin load on Kindle to handle those events. Changes: - Replace the OTG-only gate with a check that allows Kindle through - Guard OTG role management (init, menu, onExit) behind has_otg_role so it only runs on platforms with OTG sysfs knobs - On Kindle init, scan for any keyboards already present - Hide OTG menu items on Kindle (only show Help) Kobo behavior is completely unchanged. Closes: https://github.com/koreader/koreader/issues/14359