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.<p>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.<p>[1]: <a href="http://www.w3.org/TR/DOM-Level-3-Events/#keys" rel="nofollow">http://www.w3.org/TR/DOM-Level-3-Events/#keys</a>
[2]: <a href="http://www.w3.org/TR/DOM-Level-3-Events/#key-values-list" rel="nofollow">http://www.w3.org/TR/DOM-Level-3-Events/#key-values-list</a>
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).<p>Just a thought: Is it fair to characterise this as JavaScript madness and not DOM variations?