phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
37.18k stars 7.1k forks source link

stickey keys #1485

Closed BinaryMoon closed 9 years ago

BinaryMoon commented 9 years ago

I noticed when playing with the keyboard controlled demos that the keys are sticking. I've tried quite a few of the demos on the examples site and can reproduce this every time.

The issue is that the key sticks down after being pressed, if you press more than one key at a time.

For example in the starstruck demo (http://examples.phaser.io/_site/view_full.html?d=games&f=starstruck.js&t=starstruck) if you press and hold the right key to run right, and then press and release the spacebar to jump (keep right arrow pressed), then you can let go of the right arrow and the character will keep running right until the right arrow is pressed and released once more.

pnstickne commented 9 years ago

I cannot reproduce this locally in Chrome using either a laptop keyboard, an external keyboard attached to the laptop, or a different keyboard on a separate desktop.

What system (eg. OS, machine type, keyboard type) and browser(s) are affected?

It may be a specific hardware/system issue - although the behavior does not sound like a simple No-KRO problem due to being a "release" and not a "catch". Does this behavior ever occur on other [browser] games? Other games in general?

clark-stevenson commented 9 years ago

I cannot reproduce this either btw. I tried on chrome and firefox on win7 64

BinaryMoon commented 9 years ago

That's interesting. I thought I'd seen this in other browsers but I've just checked all of the ones I have currently installed (Chrome, Firefox and Safari) and it only happens in Chrome (version 41). I'm running OSX on a macbook pro.

I haven't seen this in any other online game - and I've played a lot of them :)

photonstorm commented 9 years ago

If it only happens in Chrome then it can't be keyboard ghosting causing it (which was my first suspicion). When I'm back at work I'll update Chrome on my Macbook Pro and test it.

fillmoreb commented 9 years ago

I just tested this on OSX 10.10.1, on a Macbook Pro, using Google Chrome 39.0.2171.99. Was not able to reproduce the sticky keys.

nesheroj commented 9 years ago

Chrome 41 is not yet stable channel AFAIK, try first in an incognito window (which disables all extensions unless told otherwise) and if the problem persists, probably is a beta bug.

photonstorm commented 9 years ago

Going to close this one off I'm afraid, as I just re-tested Chrome on OS X with no ill effects, so am thinking it's Canary / device specific.