Fix for missing JS KeyEvent

David Faure david at mandrakesoft.com
Fri Oct 11 17:25:26 BST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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?

(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)

- -- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9pvt472KcVAmwbhARAobtAJwIO0bcBMkCffGXoaedSvRBK2rKfACdGSjz
MvsZH8xDHXYwY24s0nsscak=
=0wPp
-----END PGP SIGNATURE-----





More information about the kfm-devel mailing list