mirror of
https://github.com/vector-im/element-web.git
synced 2026-02-15 12:41:45 +01:00
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).
This commit is contained in:
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…
x
Reference in New Issue
Block a user