document.addEventListener("keydown", function (event) { if (event.key == "Backspace") { console.log("Backspace Pressed"); } })