kasecato / vscode-intellij-idea-keybindings

Port of IntelliJ IDEA key bindings for VS Code.
https://marketplace.visualstudio.com/items?itemName=k--kato.intellij-idea-keybindings
MIT License
823 stars 137 forks source link

Shortcut keys conflict with copilot #335

Closed Windrain7 closed 6 months ago

Windrain7 commented 6 months ago

If you run this plugin, Copilot's corresponding shortcut key cannot be used.

kasecato commented 6 months ago

To support this, IntelliJ and VSCode have the same GitHub Copilot shortcut key. We don't disable IntelliJ key bindings because of conflicts, but we can change the key bindings for VSCode Copilot to IntelliJ

kasecato commented 6 months ago

Default keybindings of GitHub Copilot for VS Code

{
  "key": "ctrl+/",
  "command": "github.copilot.acceptCursorPanelSolution",
  "when": "github.copilot.activated && github.copilot.panelVisible"
},
{
  "key": "alt+]",
  "command": "github.copilot.nextPanelSolution",
  "when": "github.copilot.activated && github.copilot.panelVisible"
},
{
  "key": "alt+[",
  "command": "github.copilot.previousPanelSolution",
  "when": "github.copilot.activated && github.copilot.panelVisible"
},
{
  "key": "ctrl+enter",
  "command": "github.copilot.generate",
  "when": "editorTextFocus && github.copilot.activated && !inInteractiveInput && !interactiveEditorFocused"
},
{
  "key": "alt+\",
  "command": "editor.action.inlineSuggest.trigger",
  "when": "config.github.copilot.inlineSuggest.enable && editorTextFocus && !editorHasSelection && !inlineSuggestionsVisible"
},
{
  "key": "ctrl+i",
  "mac": "cmd+i",
  "command": "github.copilot.terminal.suggestCommand",
  "when": "terminalFocus"
}
kasecato commented 6 months ago

Look like these default keybindings are okay, probably the Accept Word operation of ctrl+right / cmd+right

https://docs.github.com/en/copilot/using-github-copilot/getting-started-with-github-copilot#partially-accepting-suggestions-1