Skip to content

Commit

Permalink
🎨 fix #11720
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Jun 15, 2024
1 parent b8346b4 commit d29174c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/src/config/keymap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,12 +428,15 @@ export const keymap = {
keys[1] = "headings";
}
let hasConflict = false;
if (["⌘", "⇧", "⌥", "⌃"].includes(keymapStr.substr(keymapStr.length - 1, 1)) ||
const isAssistKey = ["⌘", "⇧", "⌥", "⌃"].includes(keymapStr.substr(keymapStr.length - 1, 1))
if (isAssistKey ||
["⌘A", "⌘X", "⌘C", "⌘V", "⌘-", "⌘=", "⌘0", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⌃D", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦", "Escape"].includes(keymapStr) ||
// 跳转到下/上一个编辑页签不能包含 ctrl, 否则不能监听到 keyup
(isMac() && keys[0] === "general" && ["goToEditTabNext", "goToEditTabPrev"].includes(keys[1]) && keymapStr.includes("⌘"))
) {
showMessage(`${window.siyuan.languages.invalid} [${adoptKeymapStr}]`);
if (!isAssistKey) {
showMessage(`${window.siyuan.languages.invalid} [${adoptKeymapStr}]`);
}
hasConflict = true;
}
Array.from(keymap.element.querySelectorAll("label.b3-list-item input")).find((inputItem: HTMLElement) => {
Expand Down

0 comments on commit d29174c

Please sign in to comment.