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?
Is there any way to read the headset button event in a web browser using JavaScript (especially Chrome)? [closed]
Asked Answered
fwiw, 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... –
Etymon
Yashwanth Krishnan provides a nice method in this post : https://mcmap.net/q/504936/-how-to-capture-key-events-from-bluetooth-headset-with-android –
Maki
Do you have any example code how you tried to check it? –
Pacifist
This project might help you: github.com/gnaudio/jabra-browser-integration –
Fujio
I'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. –
Monumental
Possible duplicate of How to capture key events from bluetooth headset with android –
Streetwalker
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. –
Nonconductor
© 2022 - 2024 — McMap. All rights reserved.