From 999d5e1b82306af0674212a15db0a6957727984d Mon Sep 17 00:00:00 2001 From: MikiVL Date: Sat, 2 May 2026 19:29:56 +0800 Subject: [PATCH] feat: add Windows shortcuts to WelcomeView shortcut table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Show macOS and Windows shortcuts side-by-side in a three-column table. Windows uses Ctrl instead of ⌘, Ctrl+Y for redo (vs ⌘⇧Z on Mac). Co-Authored-By: Claude Sonnet 4.6 --- src/components/editor/WelcomeView.tsx | 61 ++++++++++++++++++++------- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/src/components/editor/WelcomeView.tsx b/src/components/editor/WelcomeView.tsx index 594ca05..4a1b34f 100644 --- a/src/components/editor/WelcomeView.tsx +++ b/src/components/editor/WelcomeView.tsx @@ -74,14 +74,14 @@ const FEATURES = [ ] const SHORTCUTS = [ - { keys: ['⌘', 'B'], desc: '粗体' }, - { keys: ['⌘', 'I'], desc: '斜体' }, - { keys: ['⌘', 'U'], desc: '下划线' }, - { keys: ['⌘', 'E'], desc: '行内代码' }, - { keys: ['⌘', 'Z'], desc: '撤销' }, - { keys: ['⌘', '⇧', 'Z'], desc: '重做' }, - { keys: ['/'], desc: '命令菜单' }, - { keys: ['Esc'], desc: '退出专注模式' }, + { desc: '粗体', mac: ['⌘', 'B'], win: ['Ctrl', 'B'] }, + { desc: '斜体', mac: ['⌘', 'I'], win: ['Ctrl', 'I'] }, + { desc: '下划线', mac: ['⌘', 'U'], win: ['Ctrl', 'U'] }, + { desc: '行内代码', mac: ['⌘', 'E'], win: ['Ctrl', 'E'] }, + { desc: '撤销', mac: ['⌘', 'Z'], win: ['Ctrl', 'Z'] }, + { desc: '重做', mac: ['⌘', '⇧', 'Z'], win: ['Ctrl', 'Y'] }, + { desc: '命令菜单', mac: ['/'], win: ['/'] }, + { desc: '退出专注模式', mac: ['Esc'], win: ['Esc'] }, ] export function WelcomeView() { @@ -164,22 +164,53 @@ export function WelcomeView() { > 常用快捷键 -
+
+ {/* Header */} +
+ 操作 + macOS + Windows +
{SHORTCUTS.map((s, i) => (
0 ? '1px solid var(--border)' : 'none', background: 'var(--bg-subtle)', }} > {s.desc} -
- {s.keys.map(k => ( +
+ {s.mac.map(k => ( + + {k} + + ))} +
+
+ {s.win.map(k => (