1. keyup: 키를 놓을 때 이벤트가 발생함.
2. keydown: 키를 누르면 이벤트가 발생함. 키를 누르고 있어도 단 한번만 실행됨.
3. keypress: 키를 누르면 이벤트가 발생함. (사용 권장되지 않음!)
문자열
KeyboardEvent: code values
const inputEl = document.querySelector('input');
inputEl.addEventListener('keyup', (e) => {
console.log(e.key); // ㅁ ㅌ ㅂ CapsLock a f Shift Shift
console.log(e.code); // KeyA KeyX KeyQ CapsLock KeyA KeyF ShiftLeft ShiftRight
});