Skip to content

Commit afeeeec

Browse files
committed
Keyboard.processKeyPress now checks if the Keyboard Input handler is disabled or not before processing the key callbacks.
1 parent d10dea2 commit afeeeec

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Version 2.0.7 - "Amadicia" - -in development-
5757
* InputHandler.checkPointerDown now has a new `fastTest` parameter that forces a skips a pixel perfect check even if enabled.
5858
* The key is now reported when failing to parse a Sprite Sheet (thanks @lucbloom #1026)
5959
* An editorconfig has been added to the core repo. See http://editorconfig.org (thanks @codevinksy #1027)
60+
* Keyboard.processKeyPress now checks if the Keyboard Input handler is disabled or not before processing the key callbacks.
6061

6162
### New Features
6263

src/input/Keyboard.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,11 @@ Phaser.Keyboard.prototype = {
380380

381381
this.pressEvent = event;
382382

383+
if (this.game.input.disabled || this.disabled)
384+
{
385+
return;
386+
}
387+
383388
if (this.onPressCallback)
384389
{
385390
this.onPressCallback.call(this.callbackContext, String.fromCharCode(event.charCode), event);

0 commit comments

Comments
 (0)