diff --git a/app/appearance/langs/en_US.json b/app/appearance/langs/en_US.json index b55fabd20..428c70fb2 100644 --- a/app/appearance/langs/en_US.json +++ b/app/appearance/langs/en_US.json @@ -1,4 +1,6 @@ { + "expandDown": "Expand Down", + "expandUp": "Expand Up", "goForward": "Go forward", "goBack": "Go back", "docNameAndContent": "Doc Name and Content", @@ -17,7 +19,7 @@ "defBlockChildren": "Define block and its children", "filter": "Filter", "headings1": "Headings and Bottom Blocks", - "tWithSubtitle":"Transformation with subtitles", + "tWithSubtitle": "Transformation with subtitles", "clear": "Clear", "autoDownloadUpdatePkg": "Automatically download update installation package", "autoDownloadUpdatePkgTip": "After enabling, it will automatically check the version update every two hours. If there is an updated version, it will automatically download the installation package and prompt for installation", diff --git a/app/appearance/langs/es_ES.json b/app/appearance/langs/es_ES.json index d51db1648..64d0a2557 100644 --- a/app/appearance/langs/es_ES.json +++ b/app/appearance/langs/es_ES.json @@ -1,4 +1,6 @@ { + "expandDown": "Expandir hacia abajo", + "expandUp": "Expandir hacia arriba", "goForward": "Ir hacia adelante", "goBack": "Ir hacia atrás", "docNameAndContent": "Nombre y contenido del documento", diff --git a/app/appearance/langs/fr_FR.json b/app/appearance/langs/fr_FR.json index e4641b322..aa1a2db30 100644 --- a/app/appearance/langs/fr_FR.json +++ b/app/appearance/langs/fr_FR.json @@ -1,4 +1,6 @@ { + "expandDown": "Développer vers le bas", + "expandUp": "Développer vers le haut", "goForward": "Suivant", "goBack": "Retour", "docNameAndContent": "Nom et contenu du document", diff --git a/app/appearance/langs/zh_CHT.json b/app/appearance/langs/zh_CHT.json index 61dc8b829..0997757cf 100644 --- a/app/appearance/langs/zh_CHT.json +++ b/app/appearance/langs/zh_CHT.json @@ -1,4 +1,6 @@ { + "expandDown": "向下擴選", + "expandUp": "向上擴選", "goForward": "前進", "goBack": "後退", "docNameAndContent": "文檔名和內容", diff --git a/app/appearance/langs/zh_CN.json b/app/appearance/langs/zh_CN.json index d1a108a0a..fc985b799 100644 --- a/app/appearance/langs/zh_CN.json +++ b/app/appearance/langs/zh_CN.json @@ -1,4 +1,6 @@ { + "expandDown": "向下扩选", + "expandUp": "向上扩选", "goForward": "前进", "goBack": "后退", "docNameAndContent": "文档名和内容", diff --git a/app/src/config/keymap.ts b/app/src/config/keymap.ts index e073412fb..76ad01df3 100644 --- a/app/src/config/keymap.ts +++ b/app/src/config/keymap.ts @@ -276,7 +276,7 @@ export const keymap = { } 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); return; } diff --git a/app/src/constants.ts b/app/src/constants.ts index 7052d3384..72bbe00c0 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -105,7 +105,7 @@ export abstract class Constants { "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 = { general: { syncNow: {default: "F9", custom: "F9"}, @@ -137,6 +137,8 @@ export abstract class Constants { }, editor: { general: { + expandDown: {default: "⌥⇧↓", custom: "⌥⇧↓"}, + expandUp: {default: "⌥⇧↑", custom: "⌥⇧↑"}, copyPlainText: {default: "", custom: ""}, copyID: {default: "", custom: ""}, netImg2LocalAsset: {default: "", custom: ""}, diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index 9d2442686..238212e98 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -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({ protyle, event, nodeElement, editorElement, range, cb(selectElements) { @@ -307,7 +307,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { return; } - if (matchHotKey("⌥⇧↓", event)) { + if (matchHotKey(window.siyuan.config.keymap.editor.general.expandDown.custom, event)) { downSelect({ protyle, event, nodeElement, editorElement, range, cb(selectElements) {