From d9ae179218861aab445fbe00577421cf844c4765 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 30 Nov 2023 16:41:06 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/9770 --- app/src/protyle/util/hotKey.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/protyle/util/hotKey.ts b/app/src/protyle/util/hotKey.ts index e51a3cb39..dd8d8b774 100644 --- a/app/src/protyle/util/hotKey.ts +++ b/app/src/protyle/util/hotKey.ts @@ -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]) {