How to disable keyboard short cuts on your Weebly blog
Updated: March 21, 2021
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.
I already wrote a post on how to disable right-click on images Weebly, this takes you to the next level.
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:
I already wrote a post on how to disable right-click on images Weebly, this takes you to the next level.
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.
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.