i have the options of my web application in tabs.
According to MDN, the event.metaKey returns true
for the command key on Mac keyboards and returns true
for windows keys on the Windows keyboards.
So, you should also check the ctrlKey
property to detect the control key.
if (event.ctrlKey || event.metaKey) {
//ctrlKey to detect ctrl + click
//metaKey to detect command + click on MacOS
yourCommandKeyFunction();
} else {
yourNormalFunction();
}