How to disable keyboard short cuts on your Weebly blog
By adding some simple code to your Weebly blog, you can disable the keyboard short cuts such as CTRL U, CTRL P and CTRL C.
Simply paste this code:
<script type="text/javascript"> document.onkeydown = function (event) { event = (event || window.event); if (event.keyCode == 123 || event.keyCode == 18 || event.keyCode == 80 || event.keyCode == 17 || event.keyCode == 67 || event.keyCode == 16) { alert("This function is disabled here"); return false; } } </script>
into the HEADER CODE box, under SETTINGS >>SEO, either above or below the Google Search Console code:
Simply paste this code:
<script type="text/javascript"> document.onkeydown = function (event) { event = (event || window.event); if (event.keyCode == 123 || event.keyCode == 18 || event.keyCode == 80 || event.keyCode == 17 || event.keyCode == 67 || event.keyCode == 16) { alert("This function is disabled here"); return false; } } </script>
into the HEADER CODE box, under SETTINGS >>SEO, either above or below the Google Search Console code:
Add it and see how it works!
About the Event Codes:
123 blocks the F12
18 blocks ALT
17 blocks CTRL
16 blocks SHIFT
and for added security, 67 blocks c when attempting to use CTRL C to copy text and 80 blocks the p when attempting to use CTRL P to print screen.
here is a website with all the html code:
https://docstore.mik.ua/orelly/webprog/DHTML_javascript/0596004672_jvdhtmlckbk-app-b.html
About the Event Codes:
123 blocks the F12
18 blocks ALT
17 blocks CTRL
16 blocks SHIFT
and for added security, 67 blocks c when attempting to use CTRL C to copy text and 80 blocks the p when attempting to use CTRL P to print screen.
here is a website with all the html code:
https://docstore.mik.ua/orelly/webprog/DHTML_javascript/0596004672_jvdhtmlckbk-app-b.html
More Weebly tips: Weebly Hacks