Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upUnexpected behaviour of Keyboard.keysDown #196
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
Morendil
Mar 14, 2015
This seems to be a Mac-specific issue with keyboard event handling: http://bitspushedaround.com/on-a-few-things-you-may-not-know-about-the-hellish-command-key-and-javascript-events/
Maybe there's a way to implement a workaround in elm core, but I can't think of one right now.
Morendil
commented
Mar 14, 2015
|
This seems to be a Mac-specific issue with keyboard event handling: http://bitspushedaround.com/on-a-few-things-you-may-not-know-about-the-hellish-command-key-and-javascript-events/ Maybe there's a way to implement a workaround in elm core, but I can't think of one right now. |
Morendil
closed this
Mar 15, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Morendil commentedMar 12, 2015
In the KeysDown example: http://elm-lang.org/edit/examples/Reactive/KeysDown.elm
On a Mac, in Chrome, when I press Cmd+Right Arrow the signal continues reporting the key code for Right Arrow after lifting the key. (I first noticed this after accidentally holding down Cmd while moving right in Mario, but KeysDown is a smaller example that reproduces this.)
I'm not sure if this is a bug or some unintuitive consequence of the signals machinery, but in any case there should be a documented way of getting the expected result, i.e. when Right Arrow key is up it is reported as up.
I have reproduced this in 0.15 as well.