myInput.addEventListener('keydown', function(event) { if (event.key === "Backspace") { alert("they pressed backspace"); } });