Browse Source

:art: fix https://github.com/siyuan-note/siyuan/issues/9735

Vanessa 1 year ago
parent
commit
e5c08dee7b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      app/src/protyle/util/hotKey.ts

+ 3 - 0
app/src/protyle/util/hotKey.ts

@@ -102,6 +102,9 @@ export const matchHotKey = (hotKey: string, event: KeyboardEvent) => {
 
     // 是否匹配 ⌃[] / ⌃⌘[] / ⌃⌥[] / ⌃⇧[]/ ⌃⌥⇧[]
     if (hotKey.startsWith("⌃")) {
+        if (!isMac()) {
+            return false;
+        }
         let keyCode = hotKeys.length === 3 ? hotKeys[2] : hotKeys[1];
         if (hotKeys.length === 4) {
             keyCode = hotKeys[3];