Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).keypress(function(event) {
- if (!(event.which == 115 && event.ctrlKey) && !(event.which == 19)) return true;
- alert("Ctrl-S pressed");
- event.preventDefault();
- return false;
- });
- shortcut.add("Ctrl+S",function() {
- alert("Hi there!");
- });
- $.ctrl('S', function() {
- alert("Saved");
- });
Add Comment
Please, Sign In to add comment