📅  最后修改于: 2022-03-11 15:02:05.045000             🧑  作者: Mango
let b = document.getElementById("body"); //making var for body
b.addEventListener("keydown", (evt) => {//when this happens
console.log(evt.keyCode); //log keycode
});