Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-12-2018, 03:58 AM   #1
kdusr
Connoisseur
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 77
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KOA, KV, KOA2,PW4,PW5
Question 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!
kdusr is offline   Reply With Quote
Old 12-12-2018, 12:29 PM   #2
encol
Evangelist
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
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
encol is offline   Reply With Quote
Advert
Old 12-13-2018, 09:56 AM   #3
kdusr
Connoisseur
kdusr began at the beginning.
 
kdusr's Avatar
 
Posts: 77
Karma: 13
Join Date: Oct 2016
Location: Mars
Device: KOA, KV, KOA2,PW4,PW5
Quote:
Originally Posted by encol View Post
try to grep in the dmesg the "page" word
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.
kdusr is offline   Reply With Quote
Old 12-13-2018, 10:32 AM   #4
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
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.
knc1 is offline   Reply With Quote
Old 12-13-2018, 12:58 PM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012494
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.
NiLuJe is offline   Reply With Quote
Advert
Old 12-13-2018, 02:10 PM   #6
encol
Evangelist
encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.encol ought to be getting tired of karma fortunes by now.
 
Posts: 415
Karma: 750442
Join Date: Apr 2016
Location: Italy
Device: Kindle PW3 5.8.5.0.1
Quote:
Originally Posted by kdusr View Post
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=109,state=1 (page up button)

but how to monitor those event in shell or python?
I think you should read this thread
encol is offline   Reply With Quote
Reply

Tags
button, event, koa2


Forum Jump

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


All times are GMT -4. The time now is 08:59 AM.


MobileRead.com is a privately owned, operated and funded community.