<!DOCTYPE html>
<html lang="en-US">
<body>
<p>Press a key on the keyboard in the input field</p>
<input type="text" onkeydown="myFunction(event)">
<p>The pressed key was: <span id="point"></span></p>
<script>
function myFunction(e){
document.getElementById("point").innerHTML = e.key;
}
</script> </body>
</html>