mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-27 09:24:06 +01:00
This commit is contained in:
parent
5d4e497a58
commit
b09a276a7d
9 changed files with 25 additions and 4 deletions
|
|
@ -56,6 +56,7 @@ import {openRecentDocs} from "../business/openRecentDocs";
|
|||
import {App} from "../index";
|
||||
import {commandPanel} from "../plugin/commandPanel";
|
||||
import {toggleDockBar} from "../layout/dock/util";
|
||||
import {workspaceMenu} from "../menus/workspace";
|
||||
|
||||
const getRightBlock = (element: HTMLElement, x: number, y: number) => {
|
||||
let index = 1;
|
||||
|
|
@ -579,6 +580,11 @@ export const globalShortcut = (app: App) => {
|
|||
return;
|
||||
}
|
||||
|
||||
if (bindMenuKeydown(event)) {
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.key === "ArrowUp" || event.key === "ArrowDown") {
|
||||
const viewCardsDialog = window.siyuan.dialogs.find(item => {
|
||||
if (item.element.getAttribute("data-key") === "viewCards") {
|
||||
|
|
@ -763,6 +769,12 @@ export const globalShortcut = (app: App) => {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!isTabWindow && matchHotKey(window.siyuan.config.keymap.general.mainMenu.custom, event)) {
|
||||
workspaceMenu(app, document.querySelector("#barWorkspace").getBoundingClientRect());
|
||||
event.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
if (matchHotKey(window.siyuan.config.keymap.general.goForward.custom, event)) {
|
||||
goForward(app);
|
||||
event.preventDefault();
|
||||
|
|
@ -1308,7 +1320,9 @@ const fileTreeKeydown = (app: App, event: KeyboardEvent) => {
|
|||
hasClosestByClassName(target, "protyle", true)) {
|
||||
return false;
|
||||
}
|
||||
if (bindMenuKeydown(event)) {
|
||||
if (!window.siyuan.menus.menu.element.classList.contains("fn__none") &&
|
||||
(event.code.startsWith("Arrow") || event.code === "Enter") &&
|
||||
!event.altKey && !event.shiftKey && !isCtrl(event)) {
|
||||
event.preventDefault();
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue