Skip to content

Commit

Permalink
add: device.lua.patch for changes
Browse files Browse the repository at this point in the history
  • Loading branch information
onatbas committed Aug 12, 2024
1 parent c758499 commit 9cef713
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
32 changes: 32 additions & 0 deletions device.lua.patch
Original file line number Diff line number Diff line change
@@ -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 ;).
3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9cef713

Please sign in to comment.