Entry
How can i diable the maximizing hot key in IE(F11) not sure what NS is
Feb 25th, 2002 04:50
Dan Costea, Colin Fraser, Richard S,
The short answer is that you cannot, the reason is that the f11 key
cannot be trapped. As it currently stands, I dont believe that any
function key can be trapped successfully in either NN or IE, although I
am sure that this will not continue to be the case.
The reason for this lack of control lies in the nature of the keyboard
and character sets. In Pascal, to trap the function keys F1 to F10 was
easy, but to trap F11+ required a second level of trapping, and I have
seen absolutely no reference to trapping the upper end of the function
keys at all in JavaScript, but the code I have seen for trapping F1 to
F10 did not work, but that came from the newsgroup
comp.lang.javascript, so I am not surprised.
-------------------------------------------------------
Dan Costea:
It is possible to disable F11 key! Here is an example:
<HTML>
<SCRIPT>
document.onkeydown = function ()
{
if (122 == event.keyCode)
{
event.keyCode = 0;
return false;
}
}
</SCRIPT>
<BODY >
<center><h1>F11 disabled!!!</h1></center>
</BODY>
</HTML>