키코드 파인더
키를 누르면 key, code, keyCode 및 수정자 상태를 포함한 JavaScript 이벤트 속성을 볼 수 있습니다.
Press any key to see its codes
Click anywhere on the page and press a key
Note:
keyCode and which are deprecated. Use key for character and code for physical key.Keyboard Events - 기술 세부 정보
Modern browsers use event.key (character) and event.code (physical key). The legacy keyCode property is deprecated but still widely used for compatibility.
명령줄 대안
// JavaScript keyboard event listener
document.addEventListener('keydown', (e) => {
console.log('key:', e.key);
console.log('code:', e.code);
console.log('keyCode:', e.keyCode);
});