[thelist] Please help! trapping keyboard combo on Mac OSX

david.landy at somerfield.co.uk david.landy at somerfield.co.uk
Mon Feb 23 03:21:18 CST 2004


Scott,

A shot in the dark, I know, but... 

First off, I don't know Mac at all, but as you're desperate I thought I'd
throw this in, and hope it helps. I remember a while back trying to trap
keystrokes on Netscape 4.7 and it drove me barmy. Eventually I found out
there's a javascript function you have to call to tell NS that you actually
want it to listen for keystrokes in the first place (duh! like... why???
sorry netscape fans...) which I can't quite remember now. Erm... I guess
that's about as useful as a chocolate teapot!

Have you tried searching google for eg "keycode handler osx" -- i just hit
the webpages and got some interesting looking results. And you can also
search all web group archives there, too.

Good luck and let us know how you get on.

David.


David Landy, IT Consultant
Business Intelligence
Somerfield/KwikSave
+44 (0) 117-301-8977
david.landy at somerfield.co.uk <mailto:david.landy at somerfield.co.uk>    
 
Don't be afraid to try something new. An amateur built the Ark.
Professionals built the Titanic. Author unknown.


-----Original Message-----
From: Scott Blanchard [mailto:octigonuser at hotmail.com]
Sent: Friday, 20 February 2004 17:40
To: thelist at lists.evolt.org; css-d at lists.css-discuss.org;
flashcoders at chattyfig.figleaf.com
Subject: [thelist] Please help! trapping keyboard combo on Mac OSX


I am literally about to throw my mac across the room. I have a function that

should fire when the user has typed CTRL+8 on the keyboard. This works 
perfectly on the PC, however, I cannot get it to fire on Mac in any web 
browser. I need to have this work in Mozilla and firefox on the Mac.

If anyone has any suggestions, please help. I'm running out of time...

Here's the function I am using,

window.document.onkeydown = checkHandles;

function 
checkHandles(e){e=e||window.event;if((e.ctrlKey)&&(e.keyCode==56)){alert("ye
s. 
Thank goodness it worked!!!")}}

_________________________________________________________________
Say "good-bye" to spam, viruses and pop-ups with MSN Premium -- free trial 
offer! http://click.atdmt.com/AVE/go/onm00200359ave/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 ! 
 
If you are not the intended recipient of this e-mail, please preserve the
confidentiality of it and advise the sender immediately of any error in
transmission. Any disclosure, copying, distribution or action taken, or
omitted to be taken, by an unauthorised recipient in reliance upon the
contents of this e-mail is prohibited. Somerfield cannot accept liability
for any damage which you may sustain as a result of software viruses so
please carry out your own virus checks before opening an attachment. In
replying to this e-mail you are granting the right for that reply to be
forwarded to any other individual within the business and also to be read by
others. Any views expressed by an individual within this message do not
necessarily reflect the views of Somerfield.  Somerfield reserves the right
to intercept, monitor and record communications for lawful business
purposes.


More information about the thelist mailing list