This commit is contained in:
Vanessa 2023-11-30 16:41:06 +08:00 committed by Daniel
parent 3979a72d16
commit d9ae179218
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -47,6 +47,14 @@ export const matchHotKey = (hotKey: string, event: KeyboardEvent) => {
return false;
}
// https://github.com/siyuan-note/siyuan/issues/9770
if (hotKey.startsWith("⌃") && !isMac()) {
hotKey = hotKey.replace("⌘", "").replace("⌃", "⌘")
.replace("⌘⇧", "⇧⌘")
.replace("⌘⌥⇧", "⌥⇧⌘")
.replace("⌘⌥", "⌥⌘");
}
// []
if (hotKey.indexOf("⇧") === -1 && hotKey.indexOf("⌘") === -1 && hotKey.indexOf("⌥") === -1 && hotKey.indexOf("⌃") === -1) {
if (isNotCtrl(event) && !event.altKey && !event.shiftKey && hotKey === Constants.KEYCODELIST[event.keyCode]) {