Detecting headset button press

Helge Hafting helge.hafting at hist.no
Wed Apr 29 10:47:49 CEST 2009


Ruben Leote Mendes wrote:
> Hi,
> 
> I followed the Freerunner schematics and the heaset button seems to be
> connected to EINT7/GPF7 so it seems it is possible to find out in software
> if the button is pressed.
> 
> What is the best way to do it?

Check to see if it is interpreted as a normal key already.
enlightenment can assign some actions to keys, that is how the two 
regular buttons are handled. Go into that setup, press the key and see 
if you get a keycode.  If so, you can assign an enlightenment action.

If you want to use it outside of e, run something like "xev" to check 
what keycode is produced. Then write software to listen for it.

If you don't get any keycode at all (in xev), try talking to kernel 
developers about fixing that.




More information about the community mailing list