Skip to content

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

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

Vanessafc3b0fcef4ea
diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
index 0d41000ac6..f6dbd0d3f6 100644
--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180321-hbvl5c2/20200813004551-gm0pbn1.sy
@@ -7,7 +7,7 @@
"id": "20200813004551-gm0pbn1",
"title": "快捷键",
"type": "doc",
- "updated": "20231206093707"
+ "updated": "20240112145126"
},
"Children": [
{
@@ -2977,7 +2977,7 @@
"Properties": {
"colgroup": "||",
"id": "20201227133317-vopotjc",
- "updated": "20231206093707"
+ "updated": "20240112145126"
},
"Children": [
{
@@ -6816,7 +6816,7 @@
},
{
"Type": "NodeText",
- "Data": "​​ 中配置"
+ "Data": "​ 中配置"
}
]
}
@@ -6866,6 +6866,51 @@
]
}
]
+ },
+ {
+ "Type": "NodeTableRow",
+ "Data": "tr",
+ "Children": [
+ {
+ "Type": "NodeTableCell",
+ "Data": "td",
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "退出聚焦"
+ }
+ ]
+ },
+ {
+ "Type": "NodeTableCell",
+ "Data": "td",
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "-"
+ }
+ ]
+ },
+ {
+ "Type": "NodeTableCell",
+ "Data": "td",
+ "Children": [
+ {
+ "Type": "NodeText",
+ "Data": "可前往 "
+ },
+ {
+ "Type": "NodeTextMark",
+ "TextMarkType": "kbd",
+ "TextMarkTextContent": "设置- 快捷键"
+ },
+ {
+ "Type": "NodeText",
+ "Data": "​ 中配置"
+ }
+ ]
+ }
+ ]
}
]
},
diff --git a/app/src/boot/globalEvent/keydown.ts b/app/src/boot/globalEvent/keydown.ts
index 3bdacc6219..76ba5c2475 100644
--- a/app/src/boot/globalEvent/keydown.ts
+++ b/app/src/boot/globalEvent/keydown.ts
@@ -74,6 +74,7 @@ import {getContentByInlineHTML} from "../../protyle/wysiwyg/keydown";
import {searchKeydown} from "./searchKeydown";
import {openNewWindow} from "../../window/openNewWindow";
import {historyKeydown} from "../../history/keydown";
+import {zoomOut} from "../../menus/protyle";
const switchDialogEvent = (app: App, event: MouseEvent) => {
event.preventDefault();
@@ -327,6 +328,11 @@ const editKeydown = (app: App, event: KeyboardEvent) => {
if (target.tagName !== "TABLE" && ["INPUT", "TEXTAREA"].includes(target.tagName)) {
return false;
}
+ if (matchHotKey(window.siyuan.config.keymap.editor.general.exitFocus.custom, event)) {
+ event.preventDefault();
+ zoomOut({protyle, id: protyle.block.rootID, focusId: protyle.block.id});
+ return true;
+ }
if (matchHotKey(window.siyuan.config.keymap.editor.general.backlinks.custom, event)) {
event.preventDefault();
if (range) {
diff --git a/app/src/constants.ts b/app/src/constants.ts
index 80c4d98a8b..2075dacd43 100644
--- a/app/src/constants.ts
+++ b/app/src/constants.ts
@@ -358,6 +358,7 @@ export abstract class Constants {
vLayout: {default: "", custom: ""},
refPopover: {default: "", custom: ""},
copyText: {default: "", custom: ""},
+ exitFocus: {default: "", custom: ""},
expand: {default: "⌘↓", custom: "⌘↓"},
collapse: {default: "⌘↑", custom: "⌘↑"},
insertBottom: {default: "⌥⌘.", custom: "⌥⌘."},
diff --git a/app/src/protyle/breadcrumb/index.ts b/app/src/protyle/breadcrumb/index.ts
index 9d9ec17ad9..881930572c 100644
--- a/app/src/protyle/breadcrumb/index.ts
+++ b/app/src/protyle/breadcrumb/index.ts
@@ -28,7 +28,7 @@ import {Menu} from "../../plugin/Menu";
import {getNoContainerElement} from "../wysiwyg/getBlock";
import {openTitleMenu} from "../header/openTitleMenu";
import {emitOpenMenu} from "../../plugin/EventBus";
-import {isInAndroid, isMac} from "../util/compatibility";
+import {isInAndroid, isMac, updateHotkeyTip} from "../util/compatibility";
import {resize} from "../util/resize";
export class Breadcrumb {
@@ -44,7 +44,7 @@ export class Breadcrumb {
`<button class="protyle-breadcrumb__icon" data-type="mobile-menu">${window.siyuan.languages.breadcrumb}</button>` :
'<div class="protyle-breadcrumb__bar"></div>'}
<span class="protyle-breadcrumb__space"></span>
-<button class="protyle-breadcrumb__icon fn__none" data-type="exit-focus">${window.siyuan.languages.exitFocus}</button>
+<button class="protyle-breadcrumb__icon fn__none ariaLabel" aria-label="${updateHotkeyTip(window.siyuan.config.keymap.editor.general.exitFocus.custom)}" data-type="exit-focus">${window.siyuan.languages.exitFocus}</button>
<button class="block__icon block__icon--show fn__flex-center ariaLabel${window.siyuan.config.readonly ? " fn__none" : ""}" aria-label="${window.siyuan.languages.lockEdit}" data-type="readonly"><svg><use xlink:href="#iconUnlock"></use></svg></button>
<span class="fn__space${window.siyuan.config.readonly ? " fn__none" : ""}"></span>
<button class="block__icon block__icon--show fn__flex-center ariaLabel" data-type="doc" aria-label="${isMac() ? window.siyuan.languages.gutterTip2 : window.siyuan.languages.gutterTip2.replace("⇧", "Shift+")}"><svg><use xlink:href="#iconFile"></use></svg></button>