View Single Post
Old 06-30-2019, 04:43 PM   #1
wesley6j
Junior Member
wesley6j doesn't litterwesley6j doesn't litter
 
Posts: 5
Karma: 100
Join Date: Nov 2016
Device: Kobo H2O
A tiny pageturn tool to turn pages

https://github.com/wesley6j/kobo_uti...aster/pageturn

It is a tiny tool of just a few lines of c code. It works with (slightly) patched koreader.

It is very simple to use:

Quote:
1. ssh to kobo device.
2. run pageturn.
3. navigate by entering 'd', 'u', space, enter.
4. exit with 'q' or Ctrl-C.


The device i have supports only a few keys:

Code:
root@(none) ~]# evtest /dev/input/event0
Input driver version is 1.0.0
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "mxckpd"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 35 (H)
    Event code 59 (F1)
    Event code 90 (Katakana)
    Event code 116 (Power)
Testing ... (interrupt to exit)
Therefore, I am using key F1, Katakana for page turning:

Code:
SleepCover = function(ev)
    if self.input:isEvKeyRelease(ev) then
        return Event:new("GotoViewRel", -1)
    end
end,
LightButton = function(ev)
    if self.input:isEvKeyRelease(ev) then
        return Event:new("GotoViewRel", 1)
    end
end,
As a consequence, sleep cover(F1) will not work after koreader is patched.
wesley6j is offline   Reply With Quote