Unfortunately, event.metaKey does not evaluate to true on Windows when the ctrl key is held on click.

Fortunately, event.ctrlKey does evaluate to true in these situations. Also, you may want to consider shift + clicks in your event handler.

Thus, your cross platform jquery flavored javascript code would look something like:

$('ul#tabs li a').on('click', function(e) {
    var link = $(this).attr('href');

    // Check "open in new window/tab" key modifiers
    if (e.shiftKey || e.ctrlKey || e.metaKey) {
      window.open(link, '_blank');
    } else {
      $('#content').fadeOut('fast',function(){
        window.location = link;
      });
    }
  }
});
Answer from Leighton Wallace on Stack Overflow
🌐
Computer Hope
computerhope.com › jargon › c › ctrl-click.htm
What Is Ctrl+Click?
How to use Ctrl+click, which is pressing the Ctrl key and clicking with your mouse to highlight multiple files, open links in new tabs, or open hyperlinks.
Discussions

Is there a way to make <ctrl + cmd + click on desktop> the normal behavior when I click on desktop?
What about Mission Control / Command + F3? You can also reassign the shortcut using the Mission Control settings in SysPref. More on reddit.com
🌐 r/MacOS
7
4
October 11, 2022
Can you Cmd Click and Cmd Ctrl Click A Button?
I have this macro that clicks a GUI button in Pro Tools. However that same button has different options if the user holds down command and clicks it, or holds down command and control and clicks it. Is there any way that I can achieve this in KM? Below is the code from the apple script used ... More on forum.keyboardmaestro.com
🌐 forum.keyboardmaestro.com
0
0
November 3, 2023
keyboard - jQuery: detecting cmd+click / control+click - Stack Overflow
i have the options of my web application in tabs. aaa bbb ... More on stackoverflow.com
🌐 stackoverflow.com
How to configure Command+Click to be Ctrl-Click on Windows? | Parallels Forums
How do I configure Command(⌘)+Click to be Ctrl+Click on Windows VM? I didn't like using Control(^) as Ctrl on Windows as I want to have consistent experience between Mac OS apps and Windows apps. For example, I want Command(⌘)+C/V to be copy and paste rather than having to press Control+C/V ... More on forum.parallels.com
🌐 forum.parallels.com
April 21, 2025
People also ask

What is Ctrl+Click?
Ctrl+Click is a keyboard shortcut that combines the use of the Ctrl key on your keyboard with a mouse click. By holding down the Ctrl key and simultaneously clicking on an item, you can perform various actions and access additional functionality within your computer's operating system or software.
🌐
lenovo.com
lenovo.com › home
What is Ctrl+Click? | Common Uses & Applications in Programming ...
How does Ctrl+Click work?
When you press and hold the Ctrl key on your keyboard and then click on an item using your mouse, you trigger a specific action associated with that combination. The action can vary depending on the context, the software you are using, or the operating system you have installed.
🌐
lenovo.com
lenovo.com › home
What is Ctrl+Click? | Common Uses & Applications in Programming ...
What are some common uses of Ctrl+Click?
Ctrl+Click has several practical uses across different computing tasks. For example, in web browsers, you can Ctrl+Click on links to open them in new tabs, allowing you to browse multiple pages simultaneously. In file explorers, Ctrl+Click lets you select multiple files or folders at once. Additionally, in various software applications, Ctrl+Click can be used for quick access to context menus, navigation within documents, or interacting with objects.
🌐
lenovo.com
lenovo.com › home
What is Ctrl+Click? | Common Uses & Applications in Programming ...
🌐
Keyboard Maestro
forum.keyboardmaestro.com › questions & suggestions
Can you Cmd Click and Cmd Ctrl Click A Button? - Questions & Suggestions - Keyboard Maestro Discourse
November 3, 2023 - I have this macro that clicks a GUI button in Pro Tools. However that same button has different options if the user holds down command and clicks it, or holds down command and control and clicks it. Is there any way that I can achieve this in KM? Below is the code from the apple script used ...
🌐
Praat
fon.hum.uva.nl › praat › manual › Command-click.html
Command-click
To Command-click means to click while the Command key is pressed. The Command key is the key that is marked with an apple or the word "command" on Apple keyboards, or to the key that is marked "Ctrl" if you are on a Windows or Linux computer.
Find elsewhere
🌐
Parallels
forum.parallels.com › parallels desktop for mac › windows virtual machine
How to configure Command+Click to be Ctrl-Click on Windows? | Parallels Forums
April 21, 2025 - I did this by overriding ^ to Win, ⌘ to Ctrl and ⌥ to Alt. This worked well, but it still does not do Command(⌘)+Click to be Ctrl+Click on Windows apps.
🌐
Lenovo
lenovo.com › home
What is Ctrl+Click? | Common Uses & Applications in Programming | Lenovo US
Absolutely, one of the most popular uses of Ctrl+Click is to open multiple items simultaneously. By holding down the Ctrl key and clicking on different items, such as files, links, or icons, you can open them all at once.
🌐
Code with Hugo
codewithhugo.com › detect-ctrl-click-js-react-vue
Detect ctrl/cmd/alt/shift + Click in Vanilla JavaScript, React and Vue.js · Code with Hugo
September 16, 2019 - A ModifierClick component in Vue.js uses @click modifiers to detect regular clicks with @click.exact, alt-click with @click.alt, shift-click with @click.shift, command/control-click with @click.ctrl and @click.meta respectively.
🌐
Elm
discourse.elm-lang.org › learn
How listen ctrl + click and cmd + click with elm - Learn - Elm
December 3, 2019 - https://github.com/elm/html/issues/110 I see that question But I don’t know. How to use it with event cmd + click
Top answer
1 of 16
135

First and foremost, please note that in VS Code for macOS, the familiar Ctrl + click from Windows / Linux operating systems has been replaced with ⌘ + click (i.e.: "command + click"). Try that first before proceeding any further as that shortcut should work out of the box without any special modifications.

However, if the above still doesn't work for you then try fixing the problem by editing your settings.json file. To do that, press F1, type settings json, then click Open Settings (JSON), and then do one of the following:

To use ⌘ + click as your "Go to definition" shortcut, ensure the following line exists in your JSON settings:

"editor.multiCursorModifier": "alt",

What this does is it explicitly sets VS Code's "add another cursor" shortcut to option + click (try it out for yourself!), thus freeing up ⌘ + click to be used for the "Go to definition" operation.

Conversely, to use option + click as your "Go to definition" shortcut instead, add:

"editor.multiCursorModifier": "ctrlCmd",

Note: the above line will actually set the "add another cursor" shortcut to ⌘ + click (not Ctrl + ⌘ + click, as implied by the JSON value).

2 of 16
49

Settings > User > multiCursorModifier must be set to alt (default), so the ctrl/cmd will be available to go to definition.

Documentation:

The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier.

🌐
Indigo Rose
indigorose.com › webhelp › tu20 › Windows_Basics › Mouse_Maneuvers › Ctrl-click.htm
TrueUpdate 3.9
This page requires frames Click here to view the table of contents without frames
🌐
Reddit
reddit.com › r/macbookpro › ctrl/cmd + "tap to click" issue on 14-inch macbook pro
r/macbookpro on Reddit: Ctrl/Cmd + "Tap to click" issue on 14-inch MacBook Pro
October 31, 2021 -

EDIT: Fixed in macOS 12.5 🎉

My brand new 14-inch MBP M1 Max is freaking awesome, except that tapping on the trackpad while pressing the Ctrl and Cmd key almost never works... until I tap a third time.

Quick demo video

How to reproduce:

  1. System Preferences → Trackpad → Enable "Tap to click."

  2. Move the cursor over the desktop, hold the Ctrl key, tap the trackpad (don't click!).

  3. Right-click menu does not appear.

  4. Do NOT move the cursor, keep pressing the Ctrl key, and tap twice more. Time interval between taps doesn't matter.

  5. Right-click menu appears.

  6. If keeping the Ctrl key pressed, subsequent taps always show the right-click menu.

  7. If releasing and pressing the Ctrl key again, it takes again 3 taps until the right-click menu shows up.

This is seriously handicapping when displaying the right-click menu with Ctrl+tap (even though the 2-finger tap works) but ever more when doing a Cmd+tap, to open a link in a background tab in browsers, or to show that super convenient menu in Xcode.

Issue also happens on safe mode, and even after a clean install of macOS 12.0.1. Some people reported it on their own MBPs or demo ones at Apple Stores, and only on 14-inch models. Some people also had it on a 13-inch M1 MBPs. I also reproduced a couple of times on my own one, but it happens way less often.

Interestingly, "clicking" instead of tapping does work reliably. Also, tapping once, moving the cursor, then tapping again works.

If anyone with a 14-inch MBP could give it a try and chime in, that would be great. This looks like some software issue, and hopefully Apple will quickly notice and fix it. If anyone has installed the macOS 12.1 beta, feedback are also welcome. Thanks a lot!

🌐
Obsidian
forum.obsidian.md › feature requests
Ctrl/Cmd-Click or Alt-Click within Reader pane to switch to Edit mode and put cursor at click location - Feature requests - Obsidian Forum
September 9, 2020 - Not sure how valuable this might ... in preview mode). Would be great if some click command (e.g. cmd-Click) would switch the pane into Edit mode and place the cursor at the location of the click. (I love the cmd/ctrl-E for switching modes, but this click method would take ...