diff --git a/help/SHORTCUTS.md b/help/SHORTCUTS.md index 99a1c4c4..5514f34e 100644 --- a/help/SHORTCUTS.md +++ b/help/SHORTCUTS.md @@ -1,5 +1,8 @@ --- enableMacro: true +define: + 'Ctrl/Cmd': '[= $ctx.env.isMacOS ? "Cmd" : "Ctrl" =]' + 'Alt/Option': '[= $ctx.env.isMacOS ? "Option" : "Alt" =]' --- ## Shortcuts @@ -48,6 +51,7 @@ Toggle Word Wrap | Alt/Option + W Toggle Preview | Alt/Option + V Toggle Terminal | Alt/Option + T Toggle Control Center | Alt/Option + C +Show Copy Content Panel | Ctrl/Cmd + Shift + C Presentation | F5 Zoom In | Ctrl/Cmd + = Zoom Out | Ctrl/Cmd + - @@ -96,6 +100,7 @@ Zoom Reset | Ctrl/Cmd + 0 切换文档预览显示 | Alt/Option + V 切换终端 | Alt/Option + T 切换控制中心 | Alt/Option + C +展示复制面板 | Ctrl/Cmd + Shift + C 演示模式 | F5 缩放放大 | Ctrl/Cmd + = 缩放缩小 | Ctrl/Cmd + - diff --git a/src/renderer/plugins/copy-content.tsx b/src/renderer/plugins/copy-content.tsx index 97a2ee3e..b961ff70 100644 --- a/src/renderer/plugins/copy-content.tsx +++ b/src/renderer/plugins/copy-content.tsx @@ -123,13 +123,23 @@ export default { } } + const id = 'plugin.copy-content.copy-content' + + ctx.action.registerAction({ + name: id, + handler: copyContent, + keys: [ctx.command.CtrlCmd, ctx.command.Shift, 'c'], + }) + ctx.statusBar.tapMenus(menus => { menus['status-bar-tool']?.list?.push( { - id: 'plugin.copy-content.copy-content', + id, type: 'normal', title: ctx.i18n.t('status-bar.tool.copy-content'), - onClick: () => copyContent() + subTitle: ctx.command.getKeysLabel(id), + onClick: () => copyContent(), + order: 100, }, ) })