Skip to content

Instantly share code, notes, and snippets.

@nashingofteeth
Last active August 29, 2015 14:12
Show Gist options
  • Save nashingofteeth/8e1049e844eecf93541c to your computer and use it in GitHub Desktop.
Save nashingofteeth/8e1049e844eecf93541c to your computer and use it in GitHub Desktop.
simple hotkey script
document.onkeydown = function(evt) {
evt = evt || window.event;
if (evt.keyCode == 13 && evt.ctrlKey) {
evt.preventDefault();
alert('it works!');
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment