@dave2008, I've compiled KPV with KT support from your repo (commit cc38d9e6) and run it with
Code:
/mnt/us/kindlepdfviewver/kpdf.sh /mnt/us/documents
Some patching was required:
Spoiler:
This patch is in public domain.
Code:
diff --git a/frontend/ui/device.lua b/frontend/ui/device.lua
index 915b604..454453a 100644
--- a/frontend/ui/device.lua
+++ b/frontend/ui/device.lua
@@ -67,7 +67,7 @@ end
function Device:isTouchDevice()
local model = self:getModel()
- return (model == "Kindle4") or (model == "KindlePaperWhite") or util.isEmulated()
+ return (model == "Kindle4") or (model == "KindlePaperWhite") or (model == "KindleTouch") or util.isEmulated()
end
function Device:intoScreenSaver()
diff --git a/frontend/ui/inputevent.lua b/frontend/ui/inputevent.lua
index efd2a58..a7b52f5 100644
--- a/frontend/ui/inputevent.lua
+++ b/frontend/ui/inputevent.lua
@@ -239,16 +239,20 @@ function Input:init()
else
input.open("fake_events")
local dev_mod = Device:getModel()
- -- open event0 for all models
- input.open("/dev/input/event0")
- if dev_mod ~= "KindlePaperWhite" then
- -- we don't have event1 in KindlePaperWhite
+ if dev_mod ~= "KindleTouch" then
+ -- event0 in KindleTouch is "WM8962 Beep Generator" (useless)
+ input.open("/dev/input/event0")
+ end
+ if dev_mod ~= "KindleTouch" and dev_mod ~= "KindlePaperWhite" then
+ -- event1 in KindleTouch is "imx-yoshi Headset" (useless)
+ -- and we don't have event1 in KindlePaperWhite
input.open("/dev/input/event1")
- elseif dev_mod == "KindlePaperWhite" then
+ end
+ if dev_mod == "KindlePaperWhite" then
print("Auto-detected Kindle PaperWhite")
elseif dev_mod == "KindleTouch" then
- input.open("/dev/input/event2")
- input.open("/dev/input/event3")
+ input.open("/dev/input/event2") -- Home button
+ input.open("/dev/input/event3") -- touchscreen
print("Auto-detected Kindle Touch")
elseif dev_mod == "Kindle4" then
print("Auto-detected Kindle 4")
With this patch input events are intercepted and recognized (taps are taps with handler
"onGesture", Home button is
["key"] = "Home" with handler
"onKeyPress").
But, unfortunately, KPV interface isn't displayed on screen at all.
Here is my
eips -i:
EDIT: I have Kindle Tocuh 5.1.2
EDIT2: Output of
strace eips '' has
ioctl(3, 0x4048462e, 0xbed0baf8) = 0.
EDIT3: It works. So:
- einkfb.c should be updated. Kindle Touch has 8-bit framebuffer and 800x600 screen, but it requires kindlePWeinkUpdate(), not the kindle4einkUpdate()
- tap coordinates (both X and Y) reported by touchscreen input device have range 0-4095, so they should be adjusted to screen resolution (so that X will be in range 0-600 and Y will be in range 0-800).