Any key i add with keyboard.addKey is not read by HTML above canvas?

I have this code

this.up = this.input.keyboard.addKey('W');
this.down = this.input.keyboard.addKey('S');
this.left = this.input.keyboard.addKey('A');
this.right = this.input.keyboard.addKey('D');

and use

if (this.down.isDown) {}

for movement but HTML elements above the canvas only receive every key other than those 4. Is there a way to stop phaser from capturing them? Thanks.

hello,

a workaround could be,
disable the keyboard input with

this.input.keyboard.enabled = false;

or just those keys :

this.up.enabled = false;

and re-enable it by setting this variable to true.

so maybe if your mouse it out of your game, you could disable the keyboard, and re-enable it when your mouse is over the game.

best of luck.

Thanks for your response but unfortunately the keys are still being captured even with

this.input.keyboard.enabled = false;.