hey im making a toolbar button addon using these qualifers to open links, and wanto know what keys you press on macs and linux to have event.ctrlKey, event.shiftKey and event.altKey do what they do on windows. I see theres also an event.metaKey option supposedly related to macs and/or linux, would that be the alternative for one of those three, would it be the mac command key?
also whats the middle click equivalent on macs? do they have one, am only aware the common method on windows laptops to enable middle click is to have it respond to a left+right button click
Shift Crl Alt keys on macs & linux
- patrickjdempsey
- Posts: 23686
- Joined: October 23rd, 2008, 11:43 am
- Location: Asheville NC
- Contact:
Re: Shift Crl Alt keys on macs & linux
Documentation here:
https://developer.mozilla.org/en-US/doc ... boardEvent
Command+click = middle-click on OSX
Ctrl+click = middle-click on Windows/Linux
https://developer.mozilla.org/en-US/doc ... boardEvent
Command+click = middle-click on OSX
Ctrl+click = middle-click on Windows/Linux
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
-
- Posts: 145
- Joined: November 5th, 2013, 10:54 am
Re: Shift Crl Alt keys on macs & linux
hey patrick, thats really confusing, middle clicks like a click, how can a click also be a qualifier?
what i mean is atm i have the buttons rigged to respond to middle click + Ctrl , middle click + Shift and middle click + Alt
so how could Ctrl+click = middle click? thatd be like trying to write the script Ctrl+click + Ctrl
the specific syntax im talking about is
what i mean is atm i have the buttons rigged to respond to middle click + Ctrl , middle click + Shift and middle click + Alt
so how could Ctrl+click = middle click? thatd be like trying to write the script Ctrl+click + Ctrl
the specific syntax im talking about is
Code: Select all
if(event.button == 1 && event.ctrlKey) etc
- patrickjdempsey
- Posts: 23686
- Joined: October 23rd, 2008, 11:43 am
- Location: Asheville NC
- Contact:
Re: Shift Crl Alt keys on macs & linux
I don't think you can/should have Ctrl+middle-click. Ctrl+click is reserved for simulating middle-click on mice that lack a middle button. So how will your shortcut work for those users?
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
-
- Posts: 145
- Joined: November 5th, 2013, 10:54 am
Re: Shift Crl Alt keys on macs & linux
ok so if someones mouse needs to use ctrl+ click to simulate middle click, guess it means they could only do Ctrl+click+Shift or Ctrl+click+Alt, does that seem correct?
but it wouldnt cause a problem either way as the script doesnt have a default middle click behavior, so if the two examples above work fine, otherwise also fine, and triggers are only when hovering over the buttons, not affecting anything else in the browser
but it wouldnt cause a problem either way as the script doesnt have a default middle click behavior, so if the two examples above work fine, otherwise also fine, and triggers are only when hovering over the buttons, not affecting anything else in the browser
- patrickjdempsey
- Posts: 23686
- Joined: October 23rd, 2008, 11:43 am
- Location: Asheville NC
- Contact:
Re: Shift Crl Alt keys on macs & linux
Yes I think so.
Just remember that your OSX users will need Command+click for middle-click simulation, and Control+click for right-click simulation (context menus) so your options are even more limited there.
Just remember that your OSX users will need Command+click for middle-click simulation, and Control+click for right-click simulation (context menus) so your options are even more limited there.
Tip of the day: If it has "toolbar" in the name, it's crap.
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
What my avatar is about: https://addons.mozilla.org/en-US/seamonkey/addon/sea-fox/
-
- Posts: 145
- Joined: November 5th, 2013, 10:54 am
Re: Shift Crl Alt keys on macs & linux
thanks patrick, i know it must hurt having to talk about toolbar addons so much appreciated, and will try to make my next project about something else