Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: https://github.com/siyuan-note/siyuan/issues/6093

Liang Ding09cde5cc0445
diff --git a/app/src/protyle/util/hotKey.ts b/app/src/protyle/util/hotKey.ts
index 8ac0c1fecf..9f50ff2828 100644
--- a/app/src/protyle/util/hotKey.ts
+++ b/app/src/protyle/util/hotKey.ts
@@ -45,13 +45,15 @@ export const matchHotKey = (hotKey: string, event: KeyboardEvent) => {
}
// 是否匹配 ⇧[]
- if (hotKey.startsWith("⇧") && hotKeys.length === 2 && !event.ctrlKey && !isCtrl(event) && !event.altKey && event.shiftKey) {
- if (event.code.startsWith("Digit") || event.code.startsWith("Numpad")) {
- if (hotKeys[1] === event.code.slice(-1)) {
+ if (hotKey.startsWith("⇧") && hotKeys.length === 2) {
+ if (!event.ctrlKey && !isCtrl(event) && !event.altKey && event.shiftKey) {
+ if (event.code.startsWith("Digit") || event.code.startsWith("Numpad")) {
+ if (hotKeys[1] === event.code.slice(-1)) {
+ return true;
+ }
+ } else if (event.key === hotKeys[1]) {
return true;
}
- } else if (event.key === hotKeys[1]) {
- return true;
}
return false;
}