SoFunction
Updated on 2025-04-12

Block shortcut keys in web pages


<script language="Javascript"> 
//Mask the right mouse button, Ctrl+N, Shift+F10, F5 refresh, backspace key
//Block F1 help
function () 

return false 

function KeyDown() 

//alert(); 
//Shield Alt+ Article key ← Shield Alt+ Article key →
if (()&&((==37)||(==39))) 

//alert("You are not allowed to use the ALT+ arrow keys to advance or back the web page!");
=false; 

//Mask backspace deletion key, block F5 refresh key, Ctrl + R
if ((==116)||( && ==82)) 

=0; 
=false; 

//Block Ctrl+n
if (()&&(==78)) 

=false; 

//Shift+F10
if (()&&(==121)) 

=false; 

//Shift, add the left mouse button to open a new web page
if ( == "A" && ) 

 = false; 

//Shield Alt+F4
if (()&&(==115)) 

("about:blank","","dialogWidth:1px;dialogheight:1px"); 
return false; 

//Block Ctrl+A
if(()&&(==65)) 

return false; 


</script>