addKeys(keys) → {object}
A practical way to create an object containing user selected hotkeys.
For example,
addKeys( { 'up': Phaser.KeyCode.W, 'down': Phaser.KeyCode.S, 'left': Phaser.KeyCode.A, 'right': Phaser.KeyCode.D } );
would return an object containing properties (up, down, left and right) referring to Phaser.Key object.
Parameters
| Name | Type | Description |
|---|---|---|
keys | object | A key mapping object, i.e. |
Returns
object -
An object containing the properties mapped to Phaser.Key values.
- Source code: input/Keyboard.js (Line 165)
Please login to continue.