Quote:
Originally Posted by inuxy
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.