12-12-2018, 03:58 AM | #1 |
Connoisseur
Posts: 85
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KV,KOA2,PW5
|
about capture hardware page up(down) button event?
KV and KO2 have two hardware buttons for page up(down),
when user push the buttons, system will trigge some kind event. I want to capture(receive) those kind hardware button event in my kindle App to do something, anyone can give me a hint , how to capture the hardware button event? thanks! |
12-12-2018, 12:29 PM | #2 |
Evangelist
Posts: 415
Karma: 750442
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
|
try to grep in the dmesg the "page" word
|
Advert | |
|
12-13-2018, 09:56 AM | #3 |
Connoisseur
Posts: 85
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KV,KOA2,PW5
|
click the page up down button serveal times , and run dmesg | tail -20 find the button event name, it is called :
gpio_keys_gpio_report_event: type=1, code=109,state=1 (page down button) gpio_keys_gpio_report_event: type=1, code=104,state=1 (page up button) but how to monitor those event in shell or python? Last edited by kdusr; 12-14-2018 at 09:56 AM. |
12-13-2018, 10:32 AM | #4 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
DBUS?
https://www.freedesktop.org/wiki/Software/dbus/ The Kindle system has a higher level abstraction built on top of DBUS. It is rare that DBUS is used directly in the Kindles. Although it has been present in all models since, at least, the K2 (I don't have a K1 to check). Last edited by knc1; 12-13-2018 at 10:38 AM. |
12-13-2018, 12:58 PM | #5 |
BLAM!
Posts: 13,494
Karma: 26047188
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
There's a wait-for-key (or something to that effect) binary somewhere, IIRC.
Other than that, read Linux's documentation on its input stack, I don't think the framework holds an exclusive grab on the input devices. The KV may be a special snowflake on that front, we know it magically inhibits hardware button events in some circumstances. |
Advert | |
|
12-13-2018, 02:10 PM | #6 | |
Evangelist
Posts: 415
Karma: 750442
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
|
Quote:
|
|
Tags |
button, event, koa2 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Send touch event to screen / flip page from shell | peterson | Kindle Developer's Corner | 9 | 12-22-2015 02:13 PM |
Hardware Page Turn Switch for Glo?? | kglo | Kobo Developer's Corner | 2 | 12-20-2013 09:15 AM |
REMAP previous page button to next page | rathaniel | Kindle Developer's Corner | 17 | 03-25-2013 03:02 AM |
Request Continuous (PAN and Next Page) Mode with the Next Page button | AnuragSethi | enTourage Archive | 4 | 06-18-2010 04:25 PM |
iLiad non-GTK+ apps not getting button event from X | ericshliao | iRex Developer's Corner | 7 | 08-30-2009 06:52 AM |