I have an xbox one app that has a webview containing a javascript app.
In my React app I have something like this:
navigator.gamepadInputEmulation = 'gamepad';
window.addEventListener('onkeydown', function(event) {
if (event.keyCode === 196) {
event.stopImmediatePropagation();
// custom back button logic
}
});
The custom back button logic runs but then the default controller back button logic also runs even with event.stopImmediatePropagation();
Is there any fix for this?
If I set navigator.gamepadInputEmulation = 'keyboard';
this issue goes away but then all the controller input events run twice.