瀏覽代碼

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

Vanessa 1 年之前
父節點
當前提交
e5c08dee7b
共有 1 個文件被更改,包括 3 次插入0 次删除
  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];