View Single Post
Old 07-15-2012, 09:16 AM   #2
geekmaster
Всё гениальное просто.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 5,070
Karma: 6789001
Join Date: Nov 2011
Location: Щедрость не имеет пределов.
Device: *.*
Quote:
Originally Posted by inuxy View Post
Where am I able to detect certain events on the kindle? I would like to make a script that listens for these events. One event I would be interested in is when a headphone jack is inserted.
The easiest way is to have your script call "waitforkey". To find all the keycode events, try causing events while this command is running in SSH:

while :;do waitforkey;done

It will show unique keycodes for headphone insertion and removal. On 5.0.x firmware (which booted up with the accelerometer enabled), waiforkey will even show keycodes for rotation events.
geekmaster is offline   Reply With Quote