P
petermichaux
Hi,
I don't know if there is a way to feature detect for this or not. I
have a list and the user can click on items to select. I would like
that they can command-click on Mac or control-click on other OS to
multiple select. This matches normal file system behavior.
I found this example which doesn't seem to work in Opera on Mac: the
mac variable will be false.
var mac = (navigator.appVersion.indexOf("Mac")!==-1) ? true : false;
if (mac && e.metaKey) || (!mac && e.ctrlKey) {
// do multiple selection
}
So is there a way to feature detect for what I'm doing?
Is there a reliable way to know if the OS is Mac or not?
Thanks,
Peter
I don't know if there is a way to feature detect for this or not. I
have a list and the user can click on items to select. I would like
that they can command-click on Mac or control-click on other OS to
multiple select. This matches normal file system behavior.
I found this example which doesn't seem to work in Opera on Mac: the
mac variable will be false.
var mac = (navigator.appVersion.indexOf("Mac")!==-1) ? true : false;
if (mac && e.metaKey) || (!mac && e.ctrlKey) {
// do multiple selection
}
So is there a way to feature detect for what I'm doing?
Is there a reliable way to know if the OS is Mac or not?
Thanks,
Peter