darkraziel

Keyboard input + Microsoft Edge

15 posts in this topic

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?

Share this post


Link to post
Share on other sites

I've had some testers of my game mention this problem. The most consistent issue I've noticed is key release events not being fired sometimes, but I can't spot any rhythm to when it happens. Only happens with Edge.

Share this post


Link to post
Share on other sites

I can confirm he same in Edge:
 - sometimes release event is not sent at all,
 - sometimes there is big delay before key down event is sent.

 It is not only in Phaser games, but also in games,where key handling is written from scratch.

 

Share this post


Link to post
Share on other sites

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
});

Share this post


Link to post
Share on other sites

Using events does not work for us. Did anybody else cannot get the keyboard to work on Edge? It seems that mostly release events are ignored.

Share this post


Link to post
Share on other sites

After some testing i found out this problem only happens if phaser uses webgl, so if possible set phaser to use canvas on edge and your input should work   

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.