We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33215dc commit d1aa302Copy full SHA for d1aa302
1 file changed
src/input/Keyboard.js
@@ -116,6 +116,24 @@ Phaser.Keyboard.prototype = {
116
117
},
118
119
+ /**
120
+ * Removes a Key object from the Keyboard manager.
121
+ *
122
+ * @method Phaser.Keyboard#removeKey
123
+ * @param {number} keycode - The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR
124
+ */
125
+ removeKey: function (keycode) {
126
+
127
+ if (this._keys[keycode])
128
+ {
129
130
+ delete (this._keys[keycode]);
131
132
+ this.removeKeyCapture(keycode);
133
+ }
134
135
+ },
136
137
/**
138
* Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right.
139
*
0 commit comments