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 up
EmscriptenKeyboardEvent have different behaviour in Firefox/IE/Chrome #2817
When registering keyboard callback with HTML5 API i have different behaviour in Firefox Chrome and IE. I register with
Here is the complete structure "printf" for each browser for keypress/keydown/keyup:
Chrome (v 37.0.2062.120) spacebar key:
Internet Explorer (v 11.0.9600.17280) spacebar key:
Firefox (v 32.0.2) spacebar key:
You can note that key attribute is not the same, sometime empty, space or "Spacebar" string. In the documentation key attribute is recommanded and which is deprecated but which is the only attribute which is everywhere the same.
The reason why I wrote that
The reason why
The unfortunate part here is that it looks like the new standard
The idea of the Emscripten HTML5 API here is to provide the event structure as-is, untranslated, so I think there is no bug in this API that could be fixed - but perhaps there is a bug in our documentation that does not offer a solution to the developer to do the right thing.
I think for the moment it's a good practice to stay with
The Emscripten documentation lost me of how capture key events.