Skip to content

Instantly share code, notes, and snippets.

@Rudxain
Created December 18, 2022 04:29
Show Gist options
  • Save Rudxain/3b4c755ac9231bdb05e29d68929688a5 to your computer and use it in GitHub Desktop.
Save Rudxain/3b4c755ac9231bdb05e29d68929688a5 to your computer and use it in GitHub Desktop.
Use DOM to log keyboard-presses to the browser console
addEventListener('keydown', k => console.table(k.keyCode, k.code, k.key, String.fromCharCode(k.keyCode)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment