[DOM3 Events] key repeating

The DOM3 events specification [1] does not seem to account for key
repeating.  The last draft of DOM2 events that contained a key events
proposal [2] handled repeating much better (although it did have other
problems).

It seems reasonably obvious that holding down the "a" key should
generate a keydown event, a series of textInput events, and a keyup
event.  However, there should probably be an example in Appendix A and
perhaps a normative statement somewhere to indicate this.

The bigger problem, however, is that it is impossible to detect key
repeating for characters whose purpose is something other than
generating text, since textInput events do not fire.  For example, there
is no way to detect that the down arrow key or the backspace key is
repeating.  DOM API users should not have to synthesize key repeats
since (1) it's a good bit of work that they shouldn't have to do, and
(2) it would ignore the environment's preferences for key repeating,
which includes initial delays and rates to which the user is accustomed
and perhaps accessibility preferences (such as suppressing key
repetition) as well.

-David

[1] http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/
[2] http://www.w3.org/TR/1999/WD-DOM-Level-2-19990923/events.html#Events-eventgroupings-keyevents

-- 
L. David Baron                                <URL: http://dbaron.org/ >

Received on Saturday, 22 January 2005 20:06:13 UTC