Welcome to WebmasterWorld Guest from 54.146.201.80

Forum Moderators: open

Message Too Old, No Replies

Detect ctrl+click with javascript

     
7:21 pm on May 26, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 4, 2001
posts:997
votes: 0


Is it possible to detect any key modifiers in conjunction with a click through javascript? For example cntrl+click, or alt+click, or shift+click. I've had no luck looking around. Any ideas would be great.
5:55 am on May 28, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 31, 2005
posts:1108
votes: 0


Yes it is possible, I've done it.
Do a search for "Javascript key detection ctrl" and you will find some examples.

Edit. I think I misread the question, I was thinking of key press examples rather than clicking on links with a key depressed.
However it did bring up the following
[quirksmode.org...]
which is probably what you are after.