addKey(keycode) → {Phaser.Key}
If you need more fine-grained control over a Key you can create a new Phaser.Key object via this method.
The Key object can then be polled, have events attached to it, etc.
Parameters
Name | Type | Description |
---|---|---|
keycode | integer | The keycode of the key. |
Returns
The Key object which you can store locally and reference directly.
- Source code: input/Keyboard.js (Line 144)
Please login to continue.