Nomadic Backpacker
  • HOME
  • About
    • ABOUT Me
    • About the Blog
  • Sitemap
  • ADVERTISE
  • BORDER CROSSINGS
  • DONATE
  • CONTACT
  • Travel Advice
  • Top 3 Fav Countries
  • destinations
    • United Kingdom
    • Belize
    • Honduras
    • Panama
    • Costa Rica
    • Nicaragua
    • El Salvador
    • Guatemala
    • Mexico
    • Africa
    • Turkey
    • The Balkans

How to disable keyboard short cuts on your Weebly blog

Updated: March 21, 2021

Connect on Twitter

​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:
Blocking keyboard short cuts on Weebly
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

​​More Weebly tips: Weebly Hacks
​
Powered by Create your own unique website with customizable templates.
  • HOME
  • About
    • ABOUT Me
    • About the Blog
  • Sitemap
  • ADVERTISE
  • BORDER CROSSINGS
  • DONATE
  • CONTACT
  • Travel Advice
  • Top 3 Fav Countries
  • destinations
    • United Kingdom
    • Belize
    • Honduras
    • Panama
    • Costa Rica
    • Nicaragua
    • El Salvador
    • Guatemala
    • Mexico
    • Africa
    • Turkey
    • The Balkans
​