Key Code property type

This type of property allows selecting one of the key codes available in the Phaser.Input.Keyboard.KeyCodes class:

KeyCode property. KeyCode dialog.

You can use properties of this type for binding the behavior of an object or a game action with a certain keyboard key.

Property code generation

The scene compiler generates the Key Code properties like this:

class Dragon extends Phaser.GameObjects.Sprite {

        constructor(..) {
                ...
        }

        private jumpKey: number = Phaser.Input.Keyboard.KeyCodes.UP;
}