Quantcast
Channel: MobileRead Forums - Kobo Developer's Corner
Viewing all articles
Browse latest Browse all 1562

A tiny pageturn tool to turn pages

$
0
0
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.

Viewing all articles
Browse latest Browse all 1562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>