Skip to content

Commit

Permalink
upd: update openai shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
purocean committed Apr 10, 2022
1 parent b193aec commit 7e7ce93
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions help/SHORTCUTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Presentation | F5
Zoom In | Ctrl/Cmd + =
Zoom Out | Ctrl/Cmd + -
Zoom Reset | Ctrl/Cmd + 0
OpenAI Auto Completion | Ctrl/Cmd + Alt/Option + .

:::
::: group-item [= $ctx.i18n.getCurrentLanguage() === 'zh-CN' ? '*' : '' =]中文
Expand Down Expand Up @@ -108,5 +109,6 @@ Zoom Reset | Ctrl/Cmd + 0
缩放放大 | Ctrl/Cmd + =
缩放缩小 | Ctrl/Cmd + -
缩放重置 | Ctrl/Cmd + 0
OpenAI 自动补全 | Ctrl/Cmd + Alt/Option + .
:::
::::
1 change: 1 addition & 0 deletions src/renderer/core/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export function getKeyLabel (key: XKey | string | number) {
Shift: isMacOS ? '⇧' : 'Shift',
BracketLeft: '[',
BracketRight: ']',
Period: '.',
}[key]

return str || upperFirst(key.toString())
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/plugins/editor-openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default {

ctx.action.registerAction({
name: actionName,
keys: [ctx.command.CtrlCmd, ctx.command.Shift, ctx.command.Alt, ctx.command.Space],
keys: [ctx.command.CtrlCmd, ctx.command.Alt, 'Period'],
handler: () => {
ctx.editor.getEditor().getAction('editor.action.inlineSuggest.trigger').run()
ctx.editor.getEditor().focus()
Expand Down

0 comments on commit 7e7ce93

Please sign in to comment.