TextEvent and KeyboardEvent
David Faure
faure at kde.org
Thu Oct 28 00:48:01 CEST 2004
On Thursday 28 October 2004 00:32, Darin Adler wrote:
> On Oct 27, 2004, at 3:15 PM, David Faure wrote:
>
> > Allow JS code to create a TextEvent.
> > [This isn't in WebCore since they moved to KeyboardEvent...]
>
> Long term, I think we want both a KeyboardEvent, then a TextEvent, when
> you press a key. Does that sound right to you all?
From what I understand, it depends on the key. If the key generates a character,
then yes, both events should be emitted (actually three: keydown, text, keyup).
But when pressing e.g. Shift only a KeyboardEvent should be emitted.
With dead keys and input methods there can even be more keydown/keyup events before the text event.
http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/keyset.html#KeySet
So in fact, compared to HTML, it's KHTML_KEYPRESS_EVENT that should stay in
TextEvent (renamed to TEXTINPUT_EVENT like in Webcore),
and KEYDOWN_EVENT/KEYUP_EVENT which should go into KeyboardEvent (like in Webcore).
--
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the Khtml-devel
mailing list