<html>
<head>
<script>
function whichButton(event) {
document.getElementById("demo").innerHTML = event.keyCode;
}
</script>
</head>
<body onkeyup="whichButton(event)">
<p><b>Note:</b> Make sure the right frame has focus when trying this example!</p>
<p>Click on this page, and press a key on your keyboard.</p>
<p id="demo"></p>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_dom_event_keycode by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 13:24:19 GMT -->
</html>