mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-09 00:34:20 +01:00
This commit is contained in:
parent
e87ab00969
commit
fa571a4e6f
3 changed files with 79 additions and 49 deletions
|
|
@ -43,7 +43,7 @@ import {editor} from "../config/editor";
|
|||
import {hintMoveBlock} from "../protyle/hint/extend";
|
||||
import {Backlink} from "../layout/dock/Backlink";
|
||||
import {openHistory} from "../history/history";
|
||||
import {matchCardKey, openCard} from "../card/openCard";
|
||||
import {openCard} from "../card/openCard";
|
||||
|
||||
const getRightBlock = (element: HTMLElement, x: number, y: number) => {
|
||||
let index = 1;
|
||||
|
|
@ -343,7 +343,7 @@ export const globalShortcut = () => {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!event.ctrlKey && !event.metaKey && !event.shiftKey && !event.altKey && event.key === "s") {
|
||||
if (!event.ctrlKey && !event.metaKey && !event.shiftKey && !event.altKey && ["a", "h", "g", "e"].includes(event.key.toLowerCase())) {
|
||||
const openCardDialog = window.siyuan.dialogs.find(item => {
|
||||
if (item.element.getAttribute("data-key") === window.siyuan.config.keymap.general.riffCard.custom) {
|
||||
return true;
|
||||
|
|
@ -351,7 +351,7 @@ export const globalShortcut = () => {
|
|||
});
|
||||
if (openCardDialog) {
|
||||
event.preventDefault();
|
||||
matchCardKey(event);
|
||||
openCardDialog.element.dispatchEvent(new CustomEvent("click", {detail: event.key.toLowerCase()}));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue