Skip to content

Instantly share code, notes, and snippets.

@dennisat
Created July 17, 2020 12:44
Show Gist options
  • Save dennisat/17d08b62215f237cd2db0773d1060796 to your computer and use it in GitHub Desktop.
Save dennisat/17d08b62215f237cd2db0773d1060796 to your computer and use it in GitHub Desktop.
Debug Keyboard for Javascript
(() => {
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