Skip to content

Commit b6efdff

Browse files
committed
Adding the key capture to addCursors.
1 parent 6994e4b commit b6efdff

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/core/Game.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,11 @@ Phaser.Game.prototype = {
308308

309309
if (this.renderType == Phaser.CANVAS)
310310
{
311-
console.log('%cPhaser ' + Phaser.VERSION + ' initialized. Rendering to Canvas', 'color: #ffff33; background: #000000');
311+
console.log('%cPhaser initialized. Rendering to Canvas.', 'color: #ffff33; background: #000000');
312312
}
313313
else
314314
{
315-
console.log('%cPhaser ' + Phaser.VERSION + ' initialized. Rendering to WebGL', 'color: #ffff33; background: #000000');
315+
console.log('%cPhaser initialized. Rendering to WebGL.', 'color: #ffff33; background: #000000');
316316
}
317317

318318
var pos = Phaser.VERSION.indexOf('-');

src/input/Keyboard.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ Phaser.Keyboard.prototype = {
107107
addKey: function (keycode) {
108108

109109
this._hotkeys[keycode] = new Phaser.Key(this.game, keycode);
110+
111+
this.addKeyCapture(keycode);
112+
110113
return this._hotkeys[keycode];
111114

112115
},

0 commit comments

Comments
 (0)