mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🐛 windows
This commit is contained in:
parent
43ec0a2997
commit
84b29657f8
3 changed files with 5 additions and 5 deletions
|
|
@ -382,9 +382,9 @@ export const keymap = {
|
||||||
}
|
}
|
||||||
let hasConflict = false;
|
let hasConflict = false;
|
||||||
if (["⌘", "⇧", "⌥", "⌃"].includes(keymapStr.substr(keymapStr.length - 1, 1)) ||
|
if (["⌘", "⇧", "⌥", "⌃"].includes(keymapStr.substr(keymapStr.length - 1, 1)) ||
|
||||||
["⌘A", "⌘X", "⌘C", "⌘V", "⌘-", "⌘=", "⌘0", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⌃D", "⌘⇥", "⇧⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦"].includes(keymapStr) ||
|
["⌘A", "⌘X", "⌘C", "⌘V", "⌘-", "⌘=", "⌘0", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⌃D", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦"].includes(keymapStr) ||
|
||||||
// 跳转到下/上一个编辑页签不能包含 ctrl, 否则不能监听到 keyup
|
// 跳转到下/上一个编辑页签不能包含 ctrl, 否则不能监听到 keyup
|
||||||
(keys[0] === "general" && ["goToEditTabNext", "goToEditTabPrev"].includes(keys[1]) && keymapStr.includes("⌘"))
|
(isMac() && keys[0] === "general" && ["goToEditTabNext", "goToEditTabPrev"].includes(keys[1]) && keymapStr.includes("⌘"))
|
||||||
) {
|
) {
|
||||||
showMessage(`${window.siyuan.languages.invalid} [${adoptKeymapStr}]`);
|
showMessage(`${window.siyuan.languages.invalid} [${adoptKeymapStr}]`);
|
||||||
hasConflict = true;
|
hasConflict = true;
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ export abstract class Constants {
|
||||||
};
|
};
|
||||||
// 冲突不使用 "⌘S/Q"
|
// 冲突不使用 "⌘S/Q"
|
||||||
// "⌘", "⇧", "⌥", "⌃"
|
// "⌘", "⇧", "⌥", "⌃"
|
||||||
// "⌘A", "⌘X", "⌘C", "⌘V", "⌘-", "⌘=", "⌘0", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⌃D", "⌘⇥", "⇧⌘⇥", "⇧⌘→", "⇧⌘←",
|
// "⌘A", "⌘X", "⌘C", "⌘V", "⌘-", "⌘=", "⌘0", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⌃D", "⇧⌘→", "⇧⌘←",
|
||||||
// "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦" 不可自定义
|
// "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦" 不可自定义
|
||||||
public static readonly SIYUAN_KEYMAP: IKeymap = {
|
public static readonly SIYUAN_KEYMAP: IKeymap = {
|
||||||
general: {
|
general: {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export const matchAuxiliaryHotKey = (hotKey: string, event: KeyboardEvent) => {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (event.ctrlKey) {
|
if (isMac() ? event.ctrlKey : (hotKey.includes("⌘") ? !event.ctrlKey : event.ctrlKey)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -35,7 +35,7 @@ export const matchAuxiliaryHotKey = (hotKey: string, event: KeyboardEvent) => {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (isMac() ? event.metaKey : event.ctrlKey) {
|
if (isMac() ? event.metaKey : (hotKey.includes("⌃") ? !event.ctrlKey : event.ctrlKey)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue