Reply
Thread Tools
Posts: 29 | Thanked: 15 times | Joined on Jun 2013
#1
Hi,

Would it be possible to use the button of the headset for several applications, and if yes, how please?

For example like this:
When button is pressed:
- if there is an incoming call, accept it
- else if music is playing (with QuasarMXPro), skip to next song
- else if Recorder application is open, start recording from microphone

TIA for any hints, Peter
 
pichlo's Avatar
Posts: 6,445 | Thanked: 20,981 times | Joined on Sep 2012 @ UK
#2
So what if you have music playing AND you receive a call?

(Sorry, I haven't got a clue about the actual solution. Just throwing in some food for thought.)
__________________
Русский военный корабль, иди нахуй!
 

The Following User Says Thank You to pichlo For This Useful Post:
Posts: 1,288 | Thanked: 4,316 times | Joined on Oct 2014
#3
Originally Posted by pichlo View Post
So what if you have music playing AND you receive a call?

(Sorry, I haven't got a clue about the actual solution. Just throwing in some food for thought.)
Then ny choise would be an option to accept call.
 

The Following User Says Thank You to nieldk For This Useful Post:
Posts: 27 | Thanked: 37 times | Joined on Jan 2012
#4
I just plugged in a headset and pressed its call button, while monitoring xev for output. It's picked up as the special XF86Phone button, much like the volume buttons (on phone and headset) are XF86AudioRaiseVolume and XF86AudioLowerVolume. Here's the result of a press & release:

Code:
KeyPress event, serial 30, synthetic NO, window 0x3a00001,
    root 0x4d, subw 0x0, time 694375665, (384,111), root:(386,149),
    state 0x0, keycode 177 (keysym 0x1008ff6e, XF86Phone), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x3a00001,
    root 0x4d, subw 0x0, time 694375797, (384,111), root:(386,149),
    state 0x0, keycode 177 (keysym 0x1008ff6e, XF86Phone), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
This may be a helpful place to start if you come to writing some code.
 

The Following 2 Users Say Thank You to kazzie For This Useful Post:
Posts: 95 | Thanked: 70 times | Joined on Mar 2009 @ Massachusetts
#5
Interesting. I know there different headsets out there; one with 1 button, one with 2 buttons, one with 3 buttons, and of course ones with no buttons. I can see doing a double-press to change music track and stuff. It would be neat if we could manually customize the action(s) ourself.
 
Reply

Tags
button, headset

Thread Tools

 
Forum Jump


All times are GMT. The time now is 00:51.