Fix for missing JS KeyEvent

Koos Vriezen koos.vriezen at xs4all.nl
Fri Oct 11 19:00:06 BST 2002


On Fri, 11 Oct 2002, David Faure wrote:

> On Friday 11 October 2002 19:05, Koos Vriezen wrote:
> > On Fri, 11 Oct 2002, David Faure wrote:
> >
> > >
> > > On Saturday 28 September 2002 12:24, Koos Vriezen wrote:
> > > > Hi,
> > > >
> > > > I noticed that the onkeydown event in JS, as in
> > > > 'document.onkeydown=myOnKeyDown;', gets an UIEvent and not a KeyEvent.
> > > > KHTML has support for it, but isn't available for JS. The attached patch
> > > > fills that gap
> > >
> > > One question: are you sure about the property named "key" ?
> > > Shouldn't it be named keyVal (as in the DOM spec) instead?
> >
> > I think you're right. Thanks.
>
> Ok, changed, as well as virtKey -> virtKeyVal.
>
> > > (For MSIE compatibility it looks like we should also add "keyCode" as an alias.
> > > http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/keycode.asp)
> >
> > Ok. And a textInput event?
>
> What do you mean?

KeyEvent should be called TextEvent?

> > Next week I see if I can fix some of it.
>
> I have renamed the properties - what else is there to do?

document.onkeydown=myOnKeyDown; doesn't get autorepeat keys and
document.onkeypress=myOnKeyPress; only gets those autorepeat keys.
(Mentioned earlier in this thread)

Koos





More information about the kfm-devel mailing list