Headphone media control
#1
Hi, does anyone know how to change the functionality of button presses on standard 3.5mm jack devices?

I have some headphones with a volume up/down and play/pause buttons that all work as expected. What I want to do is to copy the behavior on android of enabling a double or triple press of the play/pause button to skip forward or back in what I'm listening to. This alone would turn it into a real daily driver for me Smile
  Reply
#2
I think the kernel driver just maps the button to a key such as KEY_PLAYPAUSE using snd_jack_set_key. To do anything with double or triple clicks you would need either the application to detect and handle them, or a daemon like input-remapper to generate the key events for the alternate functions.
https://github.com/sezanzeb/input-remapper
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  control power management aular 0 838 12-16-2023, 12:16 PM
Last Post: aular
  Android remote control using SSH/ADB/scrcpy pauloliver 1 3,282 08-05-2022, 01:30 AM
Last Post: dalyb
  Trigger happy proximity sensor, broken volume control & other newbie questions grug 3 4,989 09-10-2020, 05:57 AM
Last Post: megous

Forum Jump:


Users browsing this thread: 1 Guest(s)