patch to add KeyboardEvent for JavaScript
David Faure
dfaure at klaralvdalens-datakonsult.se
Thu Nov 6 12:26:03 CET 2003
On Thursday 06 November 2003 11:37, Maciej Stachowiak wrote:
>
> On Nov 6, 2003, at 2:26 AM, David Faure wrote:
>
> > On Thursday 06 November 2003 07:26, Darin Adler wrote:
> >> + * khtml/ecma/kjs_events.h: Added DOMKeyboardEvent class.
> >
> > I am a bit surprised by this...
> > The DOM3 events spec defines TextEvent but no KeyboardEvent,
> > and we have TextEvent already.
>
> Actually they current draft has both KeyboardEvents and TextEvents. See
>
> http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/
> events.htmlhipt#Events-eventgroupings
Oh.... My fault, for having saved a local copy of the DOM3-events spec a year ago.
I hadn't realized that it wasn't finalized yet.
> > Should the two be merged, or is there a conceptual difference between
> > the two?
>
> Yes, they are different. Keyboard events are about actual raw
> keypresses, and text events are about the characters generated as a
> result. For example, pressing and releasing the control key would
> generate keyboard events but not text events.
OK.
> It's kind of funny that we have keyboard events but not text events in
> WebCore and in kdelibs it's vice versa. We should probably merge your
> TextEvent implementation ASAP (verifying that it matches the latest
> draft).
Indeed.
And I'll merge KeyboardEvent then.
Thanks!
--
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
More information about the Khtml-devel
mailing list