Created
July 17, 2020 12:44
-
-
Save dennisat/17d08b62215f237cd2db0773d1060796 to your computer and use it in GitHub Desktop.
Debug Keyboard for Javascript
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
(() => { | |
window.addEventListener('keydown', e => { | |
if (!e.ctrlKey) return; | |
if (e.code === 'KeyC') console.clear(); | |
if (e.code === 'KeyS') console.debug('----'); | |
if (e.code === 'KeyD') debugger; | |
}); | |
console.debug('Debug keyboard loaded'); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment