Skip to content

Instantly share code, notes, and snippets.

@foo9
Created September 27, 2013 06:20
Show Gist options
  • Select an option

  • Save foo9/6724770 to your computer and use it in GitHub Desktop.

Select an option

Save foo9/6724770 to your computer and use it in GitHub Desktop.
Ctrl + s
$(document).on('keydown', function(event) {
if ((event.which == 115 || event.which == 83) && (event.ctrlKey || event.metaKey) || (event.which == 19)) {
event.preventDefault();
// do something
return false;
}
return true;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment