Re: [DOM3 Events] key repeating

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
    down.

-David

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

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