Disabling Right Click and F12 Key

Which error do you get?
Already tried to find out of which type the result is?

console.log(event . key)
console.log(typeof event . key)

You can also try this…
export function keyPress ( event , $w ){
console.log(event.key)
console.log(typeof event.key)
if ( event . key == 123 ){
console . log ( “HELLO”)
}
else{console.log(“You did not press F-12”)}
}

Key-code → 123 should normaly be the right one.

Did you connected the code with the property-panel?

Edit: My suggestion will probably not help you.
On my opinion it is not possible to disable button for whole site.
You can disable buttons on a INPUT or a TEXT-FIELD, but not on the whole site.

Perhaps it is possible with a custom element.