Re: DOM3 Key events

Hi, Oliver-

Oliver Hunt wrote (on 8/1/2007 6:48 PM):
> 
> Really?  By my testing it matches Firefox 2 behaviour on both mac and 
> windows.
> 
> IE behaviour results in the keypress not being fired.
> 
> Oh, sorry, i didn't clarify (because that was just a note to be taken in 
> the context of the earlier event handler definition) the textInput event 
> is distinct from keypress, the sequence of events is (in vageuly 
> regex-like syntax):
> (keydown -> (keypress -> textInput?)?)+ -> keyup

We do plan on adding keypress (though I'd like to deprecate it), and 
will be defining the event order.  As we discussed, it will look pretty 
much like this:

(keydown -> (keypress -> textInput?)?)+ -> keylongpress? -> keyup

longkeypress is optional, and has been requested by mobiles; we're also 
adding a few other mobile-specific things.  Note that depending on the 
platform/device/etc., one or more of these events may not fire (for 
instance, you may have only keydown or keyup); but per this spec, if the 
environment supplies these events, they must happen in that order.

According to the spec as it stands, if there is an input method editor, 
it happens after this sequence, which should look something like this 
(note that the current spec doesn't have keypress, so I omitted it here):

keydown -> keyup -> [IME/textInput]

Assuming that we fit keypress in there, does this cause any problems for 
any browser?

Finally, we discussed the IME more extensively offlist... maybe you'd 
like to share your opinions about how/whether/where this should be 
specified?

Regards-
-Doug Schepers
W3C Staff Contact, SVG, CDF, and WebAPI

Received on Thursday, 2 August 2007 03:13:16 UTC