Phaser API Documentation

  Version: 
Filter
This is a beta release of our new docs system. Found an issue?
Please tell us about it in the #📖-newdocs-feedback channel on the Phaser Discord
Namespace: Keyboard
Phaser.Types.Input.Keyboard

Type Definitions

CursorKeys
Focus
Focus
Properties:
name type description
up Phaser.Input.Keyboard.Key

A Key object mapping to the UP arrow key.

down Phaser.Input.Keyboard.Key

A Key object mapping to the DOWN arrow key.

left Phaser.Input.Keyboard.Key

A Key object mapping to the LEFT arrow key.

right Phaser.Input.Keyboard.Key

A Key object mapping to the RIGHT arrow key.

space Phaser.Input.Keyboard.Key

A Key object mapping to the SPACE BAR key.

shift Phaser.Input.Keyboard.Key

A Key object mapping to the SHIFT key.

Type:
object
Since: 3.0.0
Focus
Focus
KeyboardKeydownCallback(event)
Focus
Focus

Parameters:

name type description
event KeyboardEvent

The Keyboard Event.

Type:
function
Focus
Focus
KeyComboConfig
Focus
Focus
Properties:
name type arguments Default description
resetOnWrongKey boolean <optional> true

If they press the wrong key do we reset the combo?

maxKeyDelay number <optional> 0

The max delay in ms between each key press. Above this the combo is reset. 0 means disabled.

resetOnMatch boolean <optional> false

If previously matched and they press the first key of the combo again, will it reset?

deleteOnMatch boolean <optional> false

If the combo matches, will it delete itself?

Type:
object
Since: 3.0.0
Focus
Focus