1// Key -> if you care about the character which was typed
2// Code -> if you care about the key which was pressed on the keyboard because your can change the language on your pc.
3const input = document.querySelector("input");
4input.addEventListener("keydown", function (e) {
5 console.log(e.key);
6 console.log(e.code);
7});