The event object is where you will find what key's are being pressed,
however the ctrl key is not a key on the event object but rather a modifier
and you can not prevent the execution of a modifier. To prevent a key from
being pressed you will capture the event and return the key you want pressed
instead and in your case you will choose key 0 or no key at all. If they
choose the ctrl modifier then the keypress event does not fire and I am not
sure about the keydown event you may want to experiment with that.
The general idea is this:
function checkKey(){
alert(event.keyCode)
}
<body onkeypress="checkKey()">
Bryan LaPante
----- Original Message -----
From: "Peter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 12, 2003 10:10 AM
Subject: Ctrl
Hi all.
this is a issue related with java script .sorry for a off topic question
is it possible to disable cntrl key plus key bord keys option ie i want the
users not to
Print my page using ctrl+p
or else create new page ctrl + n
menu and right click i have disable thru java script.
ctrl key i dont have any code do advice me pls.
Regards
Peter
=========================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com