[thelist] Mozilla: trapping keyboard combo

Mark Kennedy mark at eurogamer.net
Wed Feb 18 12:11:30 CST 2004


That 'e' parameter you're passing to 'checkHandles', well, that's your event
object!  Treat it a bit like the window.event object on IE.

Here's a description of the interface:

http://www.mozilla.org/docs/dom/domref/dom_event_ref.html

Mark


On Wed, 18 Feb 2004, Scott Blanchard wrote:

>How can one detect if a user has typed CTRL+8 in mozilla/gecko browsers? 
>Below is the code I use for IE, but I can't figure how to do it for Moz. Any 
>help much appreciated. Crunch time for this project!
>
>document.onkeydown = checkHandles;
>
>function 
>checkHandles(e){if(document.all){if((window.event.ctrlKey)&&(window.event.keyCode==56)){alert("IE 
>user"}else{/*Netscape*/}}
>
>_________________________________________________________________
>Click, drag and drop. My MSN is the simple way to design your homepage. 
>http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/
>
>-- 
>* * Please support the community that supports you.  * *
>http://evolt.org/help_support_evolt/
>
>For unsubscribe and other options, including the Tip Harvester 
>and archives of thelist go to: http://lists.evolt.org 
>Workers of the Web, evolt ! 
>

 



More information about the thelist mailing list