Created
August 14, 2012 06:53
-
-
Save henrik/3347047 to your computer and use it in GitHub Desktop.
Submit current form when pressing shift + alt/cmd + s.
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
// Submit current form when pressing shift + alt/cmd + s. | |
// | |
// By Henrik Nyh 2012-08-14 for Barsoom AB. | |
// Inspired by http://superuser.com/q/338255/59790 | |
var S_KEY = 83; | |
$(document).keydown(function(e) { | |
if (e.shiftKey && (e.metaKey || e.altKey) && e.which == S_KEY) { | |
$(document.activeElement).closest("form").submit(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment