mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
feat: add shortcut for Copy Content
This commit is contained in:
@@ -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 + -
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user