mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
This commit is contained in:
parent
0e050b607c
commit
40d95b095b
8 changed files with 17 additions and 5 deletions
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"expandDown": "Expand Down",
|
||||||
|
"expandUp": "Expand Up",
|
||||||
"goForward": "Go forward",
|
"goForward": "Go forward",
|
||||||
"goBack": "Go back",
|
"goBack": "Go back",
|
||||||
"docNameAndContent": "Doc Name and Content",
|
"docNameAndContent": "Doc Name and Content",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"expandDown": "Expandir hacia abajo",
|
||||||
|
"expandUp": "Expandir hacia arriba",
|
||||||
"goForward": "Ir hacia adelante",
|
"goForward": "Ir hacia adelante",
|
||||||
"goBack": "Ir hacia atrás",
|
"goBack": "Ir hacia atrás",
|
||||||
"docNameAndContent": "Nombre y contenido del documento",
|
"docNameAndContent": "Nombre y contenido del documento",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"expandDown": "Développer vers le bas",
|
||||||
|
"expandUp": "Développer vers le haut",
|
||||||
"goForward": "Suivant",
|
"goForward": "Suivant",
|
||||||
"goBack": "Retour",
|
"goBack": "Retour",
|
||||||
"docNameAndContent": "Nom et contenu du document",
|
"docNameAndContent": "Nom et contenu du document",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"expandDown": "向下擴選",
|
||||||
|
"expandUp": "向上擴選",
|
||||||
"goForward": "前進",
|
"goForward": "前進",
|
||||||
"goBack": "後退",
|
"goBack": "後退",
|
||||||
"docNameAndContent": "文檔名和內容",
|
"docNameAndContent": "文檔名和內容",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
{
|
{
|
||||||
|
"expandDown": "向下扩选",
|
||||||
|
"expandUp": "向上扩选",
|
||||||
"goForward": "前进",
|
"goForward": "前进",
|
||||||
"goBack": "后退",
|
"goBack": "后退",
|
||||||
"docNameAndContent": "文档名和内容",
|
"docNameAndContent": "文档名和内容",
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,7 @@ export const keymap = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (["⌘", "⇧", "⌥", "⌃"].includes(keymapStr.substr(keymapStr.length - 1, 1)) ||
|
if (["⌘", "⇧", "⌥", "⌃"].includes(keymapStr.substr(keymapStr.length - 1, 1)) ||
|
||||||
["⌘A", "⌘X", "⌘C", "⌘V", "⌘/", "⌥⇧↑", "⌥⇧↓", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⇧⌘⇥", "⌃⇥", "⌘⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦"].includes(keymapStr)) {
|
["⌘A", "⌘X", "⌘C", "⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⇧⌘⇥", "⌃⇥", "⌘⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦"].includes(keymapStr)) {
|
||||||
showMessage(tip + "] " + window.siyuan.languages.invalid);
|
showMessage(tip + "] " + window.siyuan.languages.invalid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ export abstract class Constants {
|
||||||
"222": ["'", '"'],
|
"222": ["'", '"'],
|
||||||
};
|
};
|
||||||
// "⌘", "⇧", "⌥", "⌃"
|
// "⌘", "⇧", "⌥", "⌃"
|
||||||
// "⌘A", "⌘X", "⌘C", "⌘V", "⌘/", "⌥⇧↑", "⌥⇧↓", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⇧⌘⇥", "⌃⇥", "⌘⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦", "⌃I", "⌃E", "⌃N", "⌃U" 不可自定义
|
// "⌘A", "⌘X", "⌘C", "⌘V", "⌘/", "⇧↑", "⇧↓", "⇧→", "⇧←", "⇧⇥", "⇧⌘⇥", "⌃⇥", "⌘⇥", "⌃⌘⇥", "⇧⌘→", "⇧⌘←", "⌘Home", "⌘End", "⇧↩", "↩", "PageUp", "PageDown", "⌫", "⌦", "⌃I", "⌃E", "⌃N", "⌃U" 不可自定义
|
||||||
public static readonly SIYUAN_KEYMAP: IKeymap = {
|
public static readonly SIYUAN_KEYMAP: IKeymap = {
|
||||||
general: {
|
general: {
|
||||||
syncNow: {default: "F9", custom: "F9"},
|
syncNow: {default: "F9", custom: "F9"},
|
||||||
|
|
@ -137,6 +137,8 @@ export abstract class Constants {
|
||||||
},
|
},
|
||||||
editor: {
|
editor: {
|
||||||
general: {
|
general: {
|
||||||
|
expandDown: {default: "⌥⇧↓", custom: "⌥⇧↓"},
|
||||||
|
expandUp: {default: "⌥⇧↑", custom: "⌥⇧↑"},
|
||||||
copyPlainText: {default: "", custom: ""},
|
copyPlainText: {default: "", custom: ""},
|
||||||
copyID: {default: "", custom: ""},
|
copyID: {default: "", custom: ""},
|
||||||
netImg2LocalAsset: {default: "", custom: ""},
|
netImg2LocalAsset: {default: "", custom: ""},
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matchHotKey("⌥⇧↑", event)) {
|
if (matchHotKey(window.siyuan.config.keymap.editor.general.expandUp.custom, event)) {
|
||||||
upSelect({
|
upSelect({
|
||||||
protyle, event, nodeElement, editorElement, range,
|
protyle, event, nodeElement, editorElement, range,
|
||||||
cb(selectElements) {
|
cb(selectElements) {
|
||||||
|
|
@ -307,7 +307,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matchHotKey("⌥⇧↓", event)) {
|
if (matchHotKey(window.siyuan.config.keymap.editor.general.expandDown.custom, event)) {
|
||||||
downSelect({
|
downSelect({
|
||||||
protyle, event, nodeElement, editorElement, range,
|
protyle, event, nodeElement, editorElement, range,
|
||||||
cb(selectElements) {
|
cb(selectElements) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue