Vanessa 2024-01-12 14:55:44 +08:00
parent 53f6030a56
commit fc3b0fcef4
4 changed files with 57 additions and 5 deletions

View file

@ -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) {