Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8053551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:53:04+00:00 2026-06-05T07:53:04+00:00

Normally, this combination opens a link as a new tab in Chrome, Firefox, and

  • 0

Normally, this combination opens a link as a new tab in Chrome, Firefox, and Safari for Macs. Is there any way to detect this? I know of jquery’s event.which, but it gives a value of 1, which is indistinguishable from a simple left click.

The use case is with Backbone HTML5 pushstate, where I want to attach a 'click' event handler that does not trigger a page load for normal navigation, yet still allow users to open a link in a new tab with a ⌘-⇧-click.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:53:06+00:00Added an answer on June 5, 2026 at 7:53 am

    You can use the event’s metaKey and shiftKey properties:

    $(window).click(function(e) {
      if(e.metaKey && e.shiftKey) {
        console.log("Command+Shift+Click");
      } else {
        console.log("Other click");
      }
    });
    

    so if, for instance, you are doing #! routing instead of actually following urls, and want command or command+shift to do normal behavior (open up in a new tab), you would have something like

    function followLink(e) {
      if(!e.metaKey) e.preventDefault();
      yourApp.navigate('/link');
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Normally the Alt key opens the menu in Windows. I need this to be
Normally, to enable logging, you'd say msiexec ... /l*v [or any other combination] .
my jQuery skills are pretty good normally but this is driving me mad! It's
I am doing some tests, just to learn (normally i do this in ajax
Normally I would just do this. $str = preg_replace('#(\d+)#', ' $1 ', $str); If
Normally we have to do like this to invoke a function from a function
This kind of code would normally work in PHP, but since the scope is
Normally I'm pretty competent with CSS but I just can't figure this one out...
Normally when I want to query large result set using Mysql I write this
I normally program in C++, so all this DataSource/DataSet/Binding stuff is confusing the hell

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.