0

I want to capture on anchor tag follwing things.

  1. control + click event in JavaScript on windows / linux.

  2. command + click event in JavaScript on mac os.

I used

\ <a onmousedown="isKeyPressed(event); return true;"> Click </a>

function isKeyPressed(event) {       
   if (event.shiftKey == 1) {
      alert('success')
    }        
}

In windows and linux OS this code runs but do not on MAC. Basically I need to block control+click on anchor tag. so they can be blocked.

Any help is greatly appriciated.

Thanks!

ajay_full_stack
  • 494
  • 7
  • 13
  • possible duplicate of [How to detect control+click in Javascript from an onclick div attribute?](http://stackoverflow.com/questions/16190455/how-to-detect-controlclick-in-javascript-from-an-onclick-div-attribute) – KAD Jul 24 '15 at 14:26
  • Do It runs on mac pc also ? – ajay_full_stack Jul 24 '15 at 14:35

0 Answers0