In my smartphone, while listening to music, when I press the call button in the earphone (the one provided with the phone), the music passes and when I press it again the music starts playing.
I would like to replicate this functionality in desktop music apps. So, in my scenario, I have an earphone (with the call button), attached to the 3.5mm jack.
How can I come know when the Call button
is pressed in the earphone. Is there someway I can analayse on of the /dev
files for this? Is this functionality even supported in the Linux kernel?