You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03: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:
@@ -69,11 +69,11 @@ export function isOnlyCtrlOrCmdKeyEvent(ev) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function isCtrlOrCmdKeyEvent(ev) {
|
export function isOnlyCtrlOrCmdIgnoreShiftKeyEvent(ev) {
|
||||||
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
||||||
if (isMac) {
|
if (isMac) {
|
||||||
return ev.metaKey && !ev.ctrlKey;
|
return ev.metaKey && !ev.altKey && !ev.ctrlKey;
|
||||||
} else {
|
} else {
|
||||||
return ev.ctrlKey && !ev.metaKey;
|
return ev.ctrlKey && !ev.altKey && !ev.metaKey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user