Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codegoalie/102926 to your computer and use it in GitHub Desktop.
Save codegoalie/102926 to your computer and use it in GitHub Desktop.
Detects Ctrl, Alt or Shift + Click
$(document).click(function(e) {
if(e.ctrlKey) {
console.log("Ctrl+Click");
// your code goes here...
} else if(e.altKey) {
console.log("Alt+Click");
} else if(e.shiftKey) {
console.log("Shift+Click");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment