Created
July 18, 2017 14:43
-
-
Save stephanbogner/e06b4ec743c0bb1357e50747d65f70ce to your computer and use it in GitHub Desktop.
Get the key code on press
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="console"> | |
Press a key to see its key code | |
</div> | |
<script> | |
var cnsl = document.getElementById('console'); | |
document.addEventListener("keyup", function(){ | |
cnsl.innerHTML = event.keyCode; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment