title: jQuery: detecting cmd+click / control+click
body: <p>i have the options of my web application in tabs.</p>
  
  <pre><code>&lt;ul id="tabs"&gt;
      &lt;li&gt;&lt;a href="a.php"&gt;aaa&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="b.php"&gt;bbb&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="c.php"&gt;ccc&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="d.php"&gt;ddd&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href="e.php"&gt;eee&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>When the user clicks on any tab (in the same window) there is a fadeout effect which i get with this code, and afterwards an automatic redirection:</p>
  
  <pre><code>$('ul#tabs li a').click(function(e){
      if(e.which == 1) {
          var link = $(this).attr('href');
          $('#content').fadeOut('fast',function(){
              window.location = link;
          });
      }
  });
  </code></pre>
  
  <p>It works great, because it ignores the mouse middle click (when opening the option in a new tab, the effect should not be triggered). The problem is that, if i open the tab with a keyboard+mouse combination, instead of opening a new tab, it triggers the whole effect/redirect code.</p>
  
  <p>So, how can i detect this with jQuery:</p>
  
  <ul>
  <li>cmd + mouse left click (mac)</li>
  <li>control + mouse left click (windows/linux)</li>
  </ul>