I am using X3DOM for a simple game, but I can't use keyboard keys the way I want to, because X3DOM reacts to them.
Example:
window.addEventListener('keydown', event => this.onKeyDown(event));
I want to have my own key event for if keyCode == 68
. That works, but X3DOM reacts to it too, by changing the navigation mode and displaying an overlay.
How can I disable this?
You can use event.preventDefault to prevent X3DOM from reacting to that key: