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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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