Skip to content

Instantly share code, notes, and snippets.

@alagu
Created May 21, 2012
Embed
What would you like to do?
$(window).keydown(function(e) {
if (event.keyCode === 13) {
if ((navigator.userAgent.indexOf('Mac OS X') !== -1) && e.metaKey) {
return saveBookmark();
} else if ((navigator.userAgent.indexOf('Mac OS X') === -1) && e.ctrlKey) {
return saveBookmark();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment