skip to Main Content

I’ve been extensively using Github Copilot and I’m looking for a convenient keybinding to effortlessly switch between the GitHub Copilot Chat panel and my code editor. I’ve experimented with various keybinding configurations, but unfortunately, none of them seem to be effective in achieving this task.

2

Answers


  1. Chosen as BEST ANSWER

    EDIT: I've found a way

    Add this to your keybindings.json file:

      {
        // Move focus to the GitHub Copilot Chat panel
        "key": "ctrl+0",
        "command": "workbench.panel.chat.view.copilot.focus",
        "when": "!inEditorsPicker && !inQuickOpen"
      },
      {
        // Move focus back to the Editor
        "key": "ctrl+0",
        "command": "workbench.action.focusActiveEditorGroup",
        "when": "inEditorsPicker || inQuickOpen"
      }
    

  2. marius-mihail’s answer worked for quick chat, but not the chat panel for me (I’m on macOS, not sure if related), so I udated it to toggle between editor and chat panel (opening the later if needed):

        {
            "key": "ctrl+alt+cmd+c",
            "command": "workbench.panel.chat.view.copilot.focus",
            "when": "editorFocus"
        },
        {
            // Move focus back to the Editor
            "key": "ctrl+alt+cmd+c",
            "command": "workbench.action.focusActiveEditorGroup",
            "when": "!editorFocus"
        }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search