I am trying to make a web app wherein it reacts to an event from the headset button. I know that the keyCode for the head set is 79
. (I checked it using a key event reader app.) Nothing happens when I use it. Is there any way to detect it?
Asked
Active
Viewed 1,967 times
28

Agi Hammerthief
- 2,114
- 1
- 22
- 38

user1572212
- 281
- 2
- 5
-
2fwiw, i've never been able to get that button to raise anything on any mobile browers. it simply doesn't fire for some reason. the volume keys are flaky too... – dandavis Sep 16 '15 at 17:18
-
1Yashwanth Krishnan provides a nice method in this post : [http://stackoverflow.com/questions/17819649/how-to-capture-key-events-from-bluetooth-headset-with-android](http://stackoverflow.com/questions/17819649/how-to-capture-key-events-from-bluetooth-headset-with-android) – tnt-rox Jan 26 '16 at 09:45
-
9Do you have any example code how you tried to check it? – Mijago Jan 27 '16 at 09:14
-
This project might help you: https://github.com/gnaudio/jabra-browser-integration – Morten Frederiksen Aug 15 '17 at 06:35
-
2I'm voting to close this question as off-topic because It's TOO old, the OP has not been online to reply for 2 years or more, the comments point to GOOD answers. – Jon Goodwin Feb 02 '18 at 22:04
-
Possible duplicate of [How to capture key events from bluetooth headset with android](https://stackoverflow.com/questions/17819649/how-to-capture-key-events-from-bluetooth-headset-with-android) – mustaccio Feb 03 '18 at 00:05
-
TLDR: as of now, on mobile you can't The question was asked about solution for web platform for android. Links in comments, other than the very specialised jabra one, are to solutions for native java android apps, so looks not relevant to this question. This is real concern for mobile web app development, so leaving the comment here for clarification. – Konstantin Levinski Apr 10 '19 at 07:51