押されたキーのキーコードを取得する
code:js
function getKey(event) {
console.log(event.key);
}
document.addEventListener("keypress", getKey, false);
#JavaScript