Skip to content

Instantly share code, notes, and snippets.

@nobodyplace
Created March 15, 2014 17:39
Show Gist options
  • Save nobodyplace/9571024 to your computer and use it in GitHub Desktop.
Save nobodyplace/9571024 to your computer and use it in GitHub Desktop.
hotkeys-sample-keypress-3
//return key
$(document).bind('keypress', 'return', function (evt){
alert('pressed enter/return key');
});
//esc key
$(document).bind('keypress', 'esc', function (evt){
alert('pressed ESC key');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment