Add alt condition back in, rename to specify igorance of shift
because this is really what this function is for - we want to ignore specifically shift but not necessarily alt (despite this probably not having any real impact).pull/21833/head
parent
d495519986
commit
d5e2a73d99
|
@ -69,11 +69,11 @@ export function isOnlyCtrlOrCmdKeyEvent(ev) {
|
|||
}
|
||||
}
|
||||
|
||||
export function isCtrlOrCmdKeyEvent(ev) {
|
||||
export function isOnlyCtrlOrCmdIgnoreShiftKeyEvent(ev) {
|
||||
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
||||
if (isMac) {
|
||||
return ev.metaKey && !ev.ctrlKey;
|
||||
return ev.metaKey && !ev.altKey && !ev.ctrlKey;
|
||||
} else {
|
||||
return ev.ctrlKey && !ev.metaKey;
|
||||
return ev.ctrlKey && !ev.altKey && !ev.metaKey;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue