Answered
Block Backspace Key while Script is open
Hi, i need a little Help 😅
i have a UI window with edittext fields, but whe i press backspace, it deletes my layers and not the text in my edittext field.
thats why i want to block Backspace and Delete key.
The Delete Key Works fine but the Backspace key will only block if you have no Layers?!
do you have any idea for me? 🙏
window.addEventListener("keydown", function(event) {if (event.keyName === "Backspace") {event.preventDefault();alert("Backspace key pressed");}});
window.addEventListener("keydown", function(event) {if (event.keyName === "Delete") {event.preventDefault();}});
