Handle Key events

Dimolas Dimitris Outsource S.A. dimolas at outsource.gr
Tue Feb 11 07:58:33 GMT 2003


First of all I would like to thank you for you immediate reply



Now let's get down to my problem again



I'm sending you a sample code that should work with window.event.keyCode

But nothing happens.



Could you please tell me what's wrong?



Thanks in advance


P.S. Konqueror Version 3.0.3 (Using KDE 3.0.3)

<script language =javascript>

	document.onkeydown =Dockeydown;
	var isNN4up = (window.Event)? true : false;

 	function Dockeydown()
	{
		var whichKey = window.event.keyCode;
		alert(whichKey);
	}
</script>


----- Original Message -----
From: "David Faure" <dfaure at klaralvdalens-datakonsult.se>
To: <kfm-devel at kde.org>
Cc: "Dimolas Dimitris Outsource S.A." <dimolas at outsource.gr>
Sent: Tuesday, February 11, 2003 1:21 AM
Subject: Re: Handle Key events


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 10 February 2003 15:49, Dimolas Dimitris Outsource S.A. wrote:
> > var isNN4up = (window.Event)? true : false;
>
> The global event object exists in IE and konq, _not_ in NN4.
> So this test looks a bit wrong to me.
>
> What's even more wrong is that you use window.event later on if isNN4up is
_false_.
>
> Anyway,
> > var whichKey = window.event.keyCode;
> should work for Konqueror.
>
> - --
> David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
> Klarälvdalens Datakonsult AB, Platform-independent software solutions
> Contributing to: http://www.konqueror.org/, http://www.koffice.org/
> KOffice-1.2.1 is available - http://download.kde.org/stable/koffice-1.2.1/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE+SDPi72KcVAmwbhARAop3AJ0fWTnuLMxV4lyv0eN5Y+8AfLoCMACggbMj
> YdckbdweLnTQqbu+2d8WWRQ=
> =Cduq
> -----END PGP SIGNATURE-----
>
>
>






More information about the kfm-devel mailing list