<script src='//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script>
<body>
아무 키나 입력해보세요.
<br>char <input type='text' id='keychar' />
<br>keycode <input type='text' id='keycode' />
<br>Alt키 <input type='checkbox' id='altkey' />
<br>Ctrl키 <input type='checkbox' id='ctrlkey' />
<br>Shift키 <input type='checkbox' id='shiftkey' />
</body>
<script>
$(function() {
$('body').keydown(function( event ) {
event.preventDefault();
console.log( event );
$('#keychar').val( String.fromCharCode( event.keyCode ) );
$('#keycode').val( event.keyCode );
$('#altkey').prop( 'checked', event.altKey );
$('#ctrlkey').prop( 'checked', event.ctrlKey );
$('#shiftkey').prop( 'checked', event.shiftKey );
});
});
</script>