diff --git a/app/src/boot/globalShortcut.ts b/app/src/boot/globalShortcut.ts
index ce6f55a47..6f83816c3 100644
--- a/app/src/boot/globalShortcut.ts
+++ b/app/src/boot/globalShortcut.ts
@@ -1212,6 +1212,7 @@ const fileTreeKeydown = (app: App, event: KeyboardEvent) => {
event.preventDefault();
return true;
}
+
if (matchHotKey("⌘/", event)) {
const liRect = liElements[0].getBoundingClientRect();
if (isFile) {
@@ -1224,6 +1225,7 @@ const fileTreeKeydown = (app: App, event: KeyboardEvent) => {
}
return true;
}
+
if (isFile && matchHotKey(window.siyuan.config.keymap.general.move.custom, event)) {
window.siyuan.menus.menu.remove();
const pathes = getTopPaths(liElements);
@@ -1233,6 +1235,19 @@ const fileTreeKeydown = (app: App, event: KeyboardEvent) => {
event.preventDefault();
return true;
}
+
+ if (isFile && matchHotKey(window.siyuan.config.keymap.editor.general.insertRight.custom, event)) {
+ window.siyuan.menus.menu.remove();
+ openFileById({
+ app,
+ id: liElements[0].getAttribute("data-node-id"),
+ action: [Constants.CB_GET_FOCUS],
+ position: "right",
+ });
+ event.preventDefault();
+ return true;
+ }
+
let searchKey = "";
if (matchHotKey(window.siyuan.config.keymap.general.replace.custom, event)) {
searchKey = window.siyuan.config.keymap.general.replace.custom;
diff --git a/app/src/menus/util.ts b/app/src/menus/util.ts
index df4aab300..f6a6fe531 100644
--- a/app/src/menus/util.ts
+++ b/app/src/menus/util.ts
@@ -11,6 +11,7 @@ import {Constants} from "../constants";
import {openNewWindowById} from "../window/openNewWindow";
import {MenuItem} from "./Menu";
import {App} from "../index";
+import {updateHotkeyTip} from "../protyle/util/compatibility";
export const exportAsset = (src: string) => {
/// #if !BROWSER
@@ -37,7 +38,7 @@ export const openEditorTab = (app: App, id: string, notebookId?: string, pathStr
const openSubmenus: IMenu[] = [{
icon: "iconLayoutRight",
label: window.siyuan.languages.insertRight,
- accelerator: "⌥Click",
+ accelerator: `${updateHotkeyTip(window.siyuan.config.keymap.editor.general.insertRight.custom)}/${updateHotkeyTip("⌥Click")}`,
click: () => {
openFileById({app, id, position: "right", action: [Constants.CB_GET_FOCUS]});
}
diff --git a/app/src/search/util.ts b/app/src/search/util.ts
index a78b863e1..d1db52a1c 100644
--- a/app/src/search/util.ts
+++ b/app/src/search/util.ts
@@ -168,7 +168,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
${updateHotkeyTip(window.siyuan.config.keymap.general.newFile.custom)} ${window.siyuan.languages.new}
Enter/Double Click ${window.siyuan.languages.searchTip2}
Click ${window.siyuan.languages.searchTip3}
- ${updateHotkeyTip("⌥Click")} ${window.siyuan.languages.searchTip4}
+ ${updateHotkeyTip(window.siyuan.config.keymap.editor.general.insertRight.custom)}/${updateHotkeyTip("⌥Click")} ${window.siyuan.languages.searchTip4}
Esc ${window.siyuan.languages.searchTip5}
@@ -720,6 +720,24 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo
if (!currentList || event.isComposing) {
return;
}
+ if (searchInputElement.value && matchHotKey(window.siyuan.config.keymap.editor.general.insertRight.custom, event)) {
+ const id = currentList.getAttribute("data-node-id");
+ fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => {
+ openFileById({
+ app,
+ id,
+ position: "right",
+ action: foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT],
+ zoomIn: foldResponse.data
+ });
+ if (closeCB) {
+ closeCB();
+ }
+ });
+ event.preventDefault();
+ event.stopPropagation();
+ return;
+ }
if (searchInputElement.value && matchHotKey(window.siyuan.config.keymap.general.newFile.custom, event)) {
newFileByName(app, searchInputElement.value);
event.preventDefault();