js watch for key pres code example
Example: how do i listen to a keypress in javascript
let b = document.getElementById("body"); //making var for body
b.addEventListener("keydown", (evt) => {//when this happens
console.log(evt.keyCode); //log keycode
});