This commit is contained in:
parent
b8346b4649
commit
d29174ca76
1 changed files with 5 additions and 2 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue