So I'm making a Chrome Extension and am currently making it so that if you press the "A" key, then an alert pops up. I've gotten this to work when I open my HTML file through my extension folder. However, when I unpack my folder into a Chrome extension and test it as a Chrome extension, the script won't run.
<script>
window.addEventListener("keyup", checkKeyPress, false);
function checkKeyPress(key){
if (key.keyCode =="65"){
alert("test")
}
}
</script>