Jump to content

Keyboard input + Microsoft Edge


darkraziel
 Share

Recommended Posts

Hi everyone, I just tested the keyboard input examples of Phaser on Microsoft Edge and it doesn't work as it should. Sometimes it won't detect key presses or keep a key pressed down even if I already stopped pressing it. I had the same problem with a game we're developing and I even noticed that some of the old games we've developed have the same problem when testing on Edge.

Has anyone else had this problem? Should I raise it as an issue on the repository?

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

I've just discovered this issue as well. Still no workaround?

Edit: I just found out that the onDown event works correctly on Edge and is a viable alternative. Previously I had a check in update where I listened for pressed input such as:

// if (this.cursorKeys.left.isDown && this.inputReleased) { // do something}

This was bugged for me on Edge as OP described. However, manually assigning an arrow key and triggering an onDown event works okay for me. For example:

this.leftKey = this.game.input.keyboard.addKey(Phaser.Keyboard.LEFT);

And then the binding:

this.leftKey.onDown.add(() => {
    // do something
});
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...
  • 1 month later...
  • 2 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...