diff --git a/device.lua.patch b/device.lua.patch new file mode 100644 index 0000000..9eae607 --- /dev/null +++ b/device.lua.patch @@ -0,0 +1,32 @@ +--- koreader/frontend/device/kobo/device.lua 2024-07-15 12:02:02.000000000 -0400 ++++ koreader/frontend/device/kobo/device.lua 2024-08-11 17:54:44.000000000 -0400 +@@ -489,6 +489,7 @@ + hasEclipseWfm = yes, + canToggleChargingLED = yes, + led_uses_channel_3 = true, ++ hasKeys = yes, + hasFrontlight = yes, + display_dpi = 300, + hasNaturalLight = yes, +@@ -828,6 +829,7 @@ + [102] = "Home", + [116] = "Power", + [193] = "RPgBack", ++ [115] = "RPgFwd", + [194] = "RPgFwd", + [331] = "Eraser", + [332] = "Highlighter", +@@ -901,6 +903,13 @@ + -- NOTE: usb hotplug event is also available in /tmp/nickel-hardware-status (... but only when Nickel is running ;p) + self.input.open("fake_events") + ++ local success, err = pcall(function() ++ self.input.open("/dev/input/event3") ++ end) ++ ++ ++ ++ + -- See if the device supports key repeat + -- This is *not* behind a hasKeys check, because we mainly use it to stop SleepCover chatter, + -- and sleep covers are available on a number of devices without keys ;). diff --git a/readme.md b/readme.md index 2842cb9..01dbfba 100755 --- a/readme.md +++ b/readme.md @@ -20,9 +20,12 @@ The plugin will also add uhid.ko kernel patch which is a requirement for certain 1. Copy this folder into koreader/plugins 2. Make sure your clicker is already paired with the kobo device. 3. Make sure that your device is mapped to /dev/input/event3 (this is not always guaranteed). If different, edit main.lua of this plugin to match the correct input device. (TODO: Automate) +4. Add hasKeys = yes to the device configuration. (TODO: Automate) 4. Add into "koreader/frontend/device/kobo/device.lua" the device event that your bluetooth device triggers for the buttons on it. See an example here: https://github.com/koreader/koreader/issues/9059#issuecomment-1464958230 . For my device, I needed to add '[115] = "RPgFwd",' into the event map. (TODO: Automate) 4. Reboot KOReader +The device.lua changes are documented in devica.lua.patch + ## Contributions