Forked from cmarshall/Detecting Ctrl, Alt, Shift + Click with jQuery
Created
April 28, 2009 04:04
-
-
Save codegoalie/102926 to your computer and use it in GitHub Desktop.
Detects Ctrl, Alt or Shift + Click
This file contains hidden or 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
$(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