Capture Key events 
Author Message
 Capture Key events

Does anyone know of a way to disable the CTRL+N event on
IE?  This code will disable it, but it will also disable
some other CTRL+ commands.  Thanks:

<SCRIPT LANGUAGE="JavaScript1.2">
function microsoftKeyPress()
{
        if (event.modifiers == event.CONTROL_MASK)
        {
                alert(event.CONTROL_MASK);
                event.returnValue=false;
                return false;
        }

Quote:
}

</script>
<body onkeydown="microsoftKeyPress();">

Dan Cagney



Wed, 25 Aug 2004 06:10:03 GMT  
 Capture Key events


Quote:
> Does anyone know of a way to disable the CTRL+N event on
> IE?  This code will disable it, but it will also disable
> some other CTRL+ commands.  Thanks:

> <SCRIPT LANGUAGE="JavaScript1.2">
> function microsoftKeyPress()
> {
> if (event.modifiers == event.CONTROL_MASK)
> {
> alert(event.CONTROL_MASK);
> event.returnValue=false;
> return false;
> }
> }
> </script>

function microsoftKeyPress()
{
 event.returnValue=event.keyCode!=78

Quote:
}
> <body onkeydown="microsoftKeyPress();">

> Dan Cagney

--
Gosha
www.stereofrog.com


Wed, 25 Aug 2004 11:27:21 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How can I capture arrow keys and alt keys event in textarea?

2. Capture backspace key on form's text

3. capturing F1 key?

4. Capturing Keys to Select Radio Buttons

5. Capturing the Enter Key

6. Capture a key stroke

7. Capturing Function Key

8. capture the key pressed

9. Capture F1-F12 Keys

10. Key captures..... (again)

11. Key captures...

12. capture function key in IE

 

 
Powered by phpBB® Forum Software