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 0d41000ac..f6dbd0d3f 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 3bdacc621..76ba5c247 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 80c4d98a8..2075dacd4 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 9d9ec17ad..881930572 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 { `` : '
'} - +