mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
de529c2edd
commit
ecf67211c3
3 changed files with 10 additions and 1 deletions
|
|
@ -103,10 +103,12 @@ export abstract class Constants {
|
||||||
"221": ["]", "}"],
|
"221": ["]", "}"],
|
||||||
"222": ["'", '"'],
|
"222": ["'", '"'],
|
||||||
};
|
};
|
||||||
|
// 冲突不使用 "⌘S/Q"
|
||||||
// "⌘", "⇧", "⌥", "⌃"
|
// "⌘", "⇧", "⌥", "⌃"
|
||||||
// "⌘A", "⌘X", "⌘C", "⌘V", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⇧⌘⇥", "⌃⇥", "⌘⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦" 不可自定义
|
// "⌘A", "⌘X", "⌘C", "⌘V", "⇧⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⇧⌘⇥", "⌃⇥", "⌘⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦" 不可自定义
|
||||||
public static readonly SIYUAN_KEYMAP: IKeymap = {
|
public static readonly SIYUAN_KEYMAP: IKeymap = {
|
||||||
general: {
|
general: {
|
||||||
|
editMode: {default: "⌘.", custom: "⌘."},
|
||||||
syncNow: {default: "F9", custom: "F9"},
|
syncNow: {default: "F9", custom: "F9"},
|
||||||
enterBack: {default: "⌥←", custom: "⌥←"},
|
enterBack: {default: "⌥←", custom: "⌥←"},
|
||||||
enter: {default: "⌥→", custom: "⌥→"},
|
enter: {default: "⌥→", custom: "⌥→"},
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ import {syncGuide} from "../sync/syncGuide";
|
||||||
import {showPopover} from "../block/popover";
|
import {showPopover} from "../block/popover";
|
||||||
import {getStartEndElement} from "../protyle/wysiwyg/commonHotkey";
|
import {getStartEndElement} from "../protyle/wysiwyg/commonHotkey";
|
||||||
import {getNextFileLi, getPreviousFileLi} from "../protyle/wysiwyg/getBlock";
|
import {getNextFileLi, getPreviousFileLi} from "../protyle/wysiwyg/getBlock";
|
||||||
|
import {editor} from "../config/editor";
|
||||||
|
|
||||||
const getRightBlock = (element: HTMLElement, x: number, y: number) => {
|
const getRightBlock = (element: HTMLElement, x: number, y: number) => {
|
||||||
let index = 1;
|
let index = 1;
|
||||||
|
|
@ -422,6 +423,12 @@ export const globalShortcut = () => {
|
||||||
syncGuide(document.querySelector("#barSync"));
|
syncGuide(document.querySelector("#barSync"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (matchHotKey(window.siyuan.config.keymap.general.editMode.custom, event)) {
|
||||||
|
event.preventDefault();
|
||||||
|
event.stopPropagation();
|
||||||
|
editor.setMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (matchHotKey(window.siyuan.config.keymap.general.lockScreen.custom, event)) {
|
if (matchHotKey(window.siyuan.config.keymap.general.lockScreen.custom, event)) {
|
||||||
exportLayout(false, () => {
|
exportLayout(false, () => {
|
||||||
fetchPost("/api/system/logoutAuth", {}, () => {
|
fetchPost("/api/system/logoutAuth", {}, () => {
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,7 @@ const initBar = () => {
|
||||||
<div id="barSearch" class="toolbar__item b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.globalSearch} ${updateHotkeyTip(window.siyuan.config.keymap.general.globalSearch.custom)}">
|
<div id="barSearch" class="toolbar__item b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.globalSearch} ${updateHotkeyTip(window.siyuan.config.keymap.general.globalSearch.custom)}">
|
||||||
<svg><use xlink:href="#iconSearch"></use></svg>
|
<svg><use xlink:href="#iconSearch"></use></svg>
|
||||||
</div>
|
</div>
|
||||||
<div id="barReadonly" class="toolbar__item b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.use} ${window.siyuan.config.editor.readOnly ? window.siyuan.languages.editMode : window.siyuan.languages.editReadonly}">
|
<div id="barReadonly" class="toolbar__item b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.use} ${window.siyuan.config.editor.readOnly ? window.siyuan.languages.editMode : window.siyuan.languages.editReadonly} ${updateHotkeyTip(window.siyuan.config.keymap.general.editMode.custom)}">
|
||||||
<svg><use xlink:href="#icon${window.siyuan.config.editor.readOnly ? "Preview" : "Edit"}"></use></svg>
|
<svg><use xlink:href="#icon${window.siyuan.config.editor.readOnly ? "Preview" : "Edit"}"></use></svg>
|
||||||
</div>
|
</div>
|
||||||
<div id="barMode" class="toolbar__item b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.appearanceMode}">
|
<div id="barMode" class="toolbar__item b3-tooltips b3-tooltips__sw" aria-label="${window.siyuan.languages.appearanceMode}">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue