Skip to content

Commit 531cd49

Browse files
committed
Created Phaser.KeyCode enumeration / pseudo-type
- Impact: none/foward-migration; fully backwards compatible - Moves the key code constants in Keyboard to a KeyCode type. - Duplicates the KeyCodes in the Keyboard object for backward compatiblity. - KeyCode properties are listed in documentation - Updates documentaion to refer to Phaser.KeyCode - Adds in future 'keycode' expansion capabilities, as indicated by the KeyCode documentation, if the constants are used in code. Closes phaserjs#2031
1 parent ede827c commit 531cd49

2 files changed

Lines changed: 251 additions & 119 deletions

File tree

src/input/Key.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* @class Phaser.Key
1111
* @constructor
1212
* @param {Phaser.Game} game - Current game instance.
13-
* @param {number} keycode - The key code this Key is responsible for.
13+
* @param {integer} keycode - The key code this Key is responsible for. See {@link Phaser.KeyCode}.
1414
*/
1515
Phaser.Key = function (game, keycode) {
1616

0 commit comments

Comments
 (0)