That code was working before Phaser updating from 3.19.0 to 3.54.0 version.
const scene: Phaser.Scene = …;
scene.input.keyboard.on(“keydown_SPACE”, () => console.log(‘space pressed’));
Probably, something was changed in keyboard-plugin.
How I can add event listener for keyboard events for the phaser game scene now?