diff --git a/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts b/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts index f295ea1bdd..94c97e29c7 100644 --- a/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts +++ b/frontend/src/components/pure/ms-minder-editor/hooks/useShortCut.ts @@ -108,11 +108,11 @@ export default function useShortCut(shortcuts: Shortcuts, options: MinderOperati } default: } - const key = event.key.toLowerCase(); - - if (key === 'f2') { + const code = event.code.toLowerCase(); + if (code === 'space') { // 执行快捷键编辑事件 if (shortcuts.input) { + event.preventDefault(); shortcuts.input(event); } } diff --git a/frontend/src/components/pure/ms-minder-editor/locale/en-US.ts b/frontend/src/components/pure/ms-minder-editor/locale/en-US.ts index 76bb82f53e..554243575e 100644 --- a/frontend/src/components/pure/ms-minder-editor/locale/en-US.ts +++ b/frontend/src/components/pure/ms-minder-editor/locale/en-US.ts @@ -115,5 +115,6 @@ export default { expand: 'Expand/Collapse', notSupportClipboard: 'Due to browser security policy restrictions, websites that are not HTTPS cannot access the clipboard. Please use keyboard shortcuts to copy/paste.', + editNodeText: '编辑节点文本', }, }; diff --git a/frontend/src/components/pure/ms-minder-editor/locale/zh-CN.ts b/frontend/src/components/pure/ms-minder-editor/locale/zh-CN.ts index a60930ea10..09026129d6 100644 --- a/frontend/src/components/pure/ms-minder-editor/locale/zh-CN.ts +++ b/frontend/src/components/pure/ms-minder-editor/locale/zh-CN.ts @@ -108,5 +108,6 @@ export default { shortcutTitle: '快捷键说明', expand: '展开/收起', notSupportClipboard: '因浏览器安全策略限制,非 HTTPS 协议的网站无法访问剪贴板,请使用快捷键复制/粘贴', + editNodeText: '编辑节点文本', }, }; diff --git a/frontend/src/components/pure/ms-minder-editor/main/navigator.vue b/frontend/src/components/pure/ms-minder-editor/main/navigator.vue index eec153dd74..bfa5978276 100644 --- a/frontend/src/components/pure/ms-minder-editor/main/navigator.vue +++ b/frontend/src/components/pure/ms-minder-editor/main/navigator.vue @@ -134,6 +134,12 @@
Y
--> +
+
{{ t('minder.editNodeText') }}
+
+ Space +
+