

JavaScript Madness: Keyboard Events - carey
http://unixpapa.com/js/key.html

======
Keithamus
Part of DOM Level 3 is a new set of keyboard event attributes[1], including a
string value[2] which can make this whole keyboard mess much simpler.

Unfortunately none of the browser vendors have implemented this - which I find
irritating considering so much time is spent on things like the GamePad API.

[1]: <http://www.w3.org/TR/DOM-Level-3-Events/#keys> [2]:
<http://www.w3.org/TR/DOM-Level-3-Events/#key-values-list>

------
bdfh42
And then there is the question of what an "event" signifies. I noticed the
other day in testing a web app that the Windows Phone 7 browser fires the
"keyup" event before the character of the key is added to the relevant text
box value - while all other browsers I have tested update the text box value
before firing "keyup" (although after "keydown" of coure).

Just a thought: Is it fair to characterise this as JavaScript madness and not
DOM variations?

