i have a problem with keyCode in javascript i used this exact code from tutorial
document.addEventListener("keypress", keypressed);
function keypressed(event){
if(event.keyCode === 46){
alert("key pressed")
}
}
but it doesn't work for me (it works in the tutorial), however when i tried to use enter which is 13 and space which is 32 both work, but not a-z or numbers or anything else, any idea why? Thanks in advance