W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2005

Re: [DOM3 Events] key repeating

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 3 Mar 2005 14:14:20 -0500
To: www-dom@w3.org
Message-ID: <20050303191420.GA27600@ridley.dbaron.org>
On Monday 2005-01-24 14:04 -0500, Philippe Le Hegaret wrote:
> In the case of a key repeat, you should generate multiple
> keydown/textInput/keyup, and not just the textInput. That's exactly what
> the repeat functionality is about. It does have the drawback of not
> having the ability to differentiate between fast key input from a user
> on a keyboard and the key repeat functionality.

That drawback seems significant (especially for things like online
games, where holding down something that's normally a repeating key
could cause a state transition), and the fix for it seems reasonably
simple.  I propose modifying the model by:

 1) adding back keypress events (They would carry the same data about
    the key that keyup and keydown events carry now.), and 

 2) making keyup and keydown events fire only when a key goes up or


L. David Baron                                <URL: http://dbaron.org/ >
          Technical Lead, Layout & CSS, The Mozilla Foundation

Received on Thursday, 3 March 2005 19:15:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:12 UTC