Phaser API Documentation

  Version: 
removeKey(key, [destroy])

Description:

Removes a Key object from this Keyboard Plugin.

The given argument can be either a Key object, a string, such as A or SPACE, or a key code value.

Parameters:

name type arguments Default description
key string | number | Phaser.Input.Keyboard.Key

Either a Key object, a string, such as A or SPACE, or a key code value.

destroy boolean <optional> false

Call Key.destroy on the removed Key object?

Returns:
Description:

This KeyboardPlugin object.

Since: 3.10.0