Closed ghost closed 9 years ago
I've read the discussion - my keyboard has the "⊞" key, but it cannot be picked up by my browser since it's a OS specific key in Linux (Debian at least). It's not even a windows issue, it's a non-OSX issue. Linux, BSD, and Windows users will all have this.
What key do you hold down while clicking a link so that it opens in a new tab?
On Windows I use ctrl
for this.
Right, the problem is then that on windows, the Meta key is the Windows key, which doesn't really do what's expected. http://api.jquery.com/event.metakey/
There's no meta key on linux (according to jquery)... Listen to 'ctrl' key code? Won't hurt on OSX and fixes win and linux.
Well, on OSX the ctrl key brings up the contextual menu....
I suppose checking for user agent is too big a footprint?
yeah don't want to do ctrl key because of the menu problem
@fat - Thanks for making this awesome plugin. I came across this as I was looking at trending Javascript projects on GitHub.
My understanding is that e.ctrlKey does;t actually fire when you use the ctrl key on Mac - so you are safe to use metaKey for Mac and ctrl key for Windows. I actually use this in one of my corporate applications - metaKey+click on Mac, ctrl+click on Windows. A quick debug+inspect in safari when clicking on the image in http://fat.github.io/zoom.js/ also shows that e.ctrlKey doesn't fire when I use ctrl+click on a Mac. If this is good with you, I'd love to pull and make the enhancement.
fixed!
nice, thx! :)
There was a discussion on this topic here #3 It seems that at least windows doesn't have a meta key and thus isn't supported atm :/