Disabling right click & f12

this wasn’t done on velo so idk if this is the right spot to post since i just saw a thread asking advice about this on this area.

anyway,
was able to make use of a code snippet for disabling f12 and rightclik for your wix website. although we have saledish content protect , but it doesn’t disable the f12 key.


go to your dashboard. settings > custom code
i added mine as a body. copy paste the code below

f12 is disabled as well as other keys. still not safe for the “:” in accessing developer tools, which i think it’s impossible upon further reading into forums. at least this creates another barrier to non-tech savvy users.

also, i don’t know how to code. does anyone know how to make it so that a text appears when they press the disabled keys? and i’d like to also disable combination keys like ctrl+shift 3 or 4 just to disable the screenshot key on mac. is this possible? thanks!

<script>
    // disable right click
    document.addEventListener('contextmenu', event => event.preventDefault());
 
    document.onkeydown = function (e) {
 
        // disable F12 key
        if(e.keyCode == 123) {
            return false;
        }
 
        // disable I key
        if(e.ctrlKey && e.shiftKey && e.keyCode == 73){
            return false;
        }
 
        // disable J key
        if(e.ctrlKey && e.shiftKey && e.keyCode == 74) {
            return false;
        }
 
        // disable U key
        if(e.ctrlKey && e.keyCode == 85) {
            return false;
        }
    }
 
</script>