diff --git a/frontend/ui/device.lua b/frontend/ui/device.lua index 915b60447..454453a9a 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 efd2a58b8..a7b52f590 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")