GitHub Copilot keyboard shortcuts for Windows, Linux and Mac

GitHub Copilot's default keys per editor, from GitHub Docs and the Visual Studio Code documentation. VS Code comes first, with Windows / Linux and Mac columns: inline suggestions, chat, the Agents window, and the slash commands and mentions typed into chat. Shorter tables cover JetBrains IDEs, Visual Studio, Eclipse and Xcode; GitHub lists no default keys for Vim/Neovim. Tab accepts a suggestion in VS Code, JetBrains IDEs and Eclipse, but only its first line in Xcode.

60 shortcuts in 9 sections. Checked row by row against GitHub Docs on . Edited by Jay.

Inline suggestions in VS Code 8

Turning Copilot on or off has no default shortcut in VS Code; GitHub lists the command github.copilot.toggleCopilot for binding your own.

The suggestions pane is the one VS Code key that keeps Ctrl on a Mac: Ctrl + Return.

ActionWindows / LinuxMac
Accept suggestionInserts the ghost text shown at the cursor into the file.TabTab
Dismiss suggestionHides the ghost text and leaves the code unchanged.EscEsc
Next suggestionSwaps the ghost text for the following alternative at the same position.Alt+]Option+]
Previous suggestionSteps back to the alternative that was displayed before.Alt+[Option+[
Trigger suggestionAsks for a completion at the cursor on demand.Alt+\Option+\
Open suggestions paneLists further completions in a pane of their own; the Mac key is Ctrl as well, not Cmd.Ctrl+EnterCtrl+Return
Accept next wordTakes part of the ghost text only: its next word, or its next line.Ctrl+RightCmd+Right
Go to next edit suggestionMoves the cursor to the place where an edit is predicted; a second press applies it.TabTab

Chat in VS Code 8

ActionWindows / LinuxMac
Open Chat viewShows the panel where conversations with an agent take place.Ctrl+Alt+ICtrl+Cmd+I
Start new chatBegins a fresh conversation, useful when the next task is unrelated.Ctrl+NCmd+N
Open editor inline chatPuts a prompt box inside the editor; select code first to limit the request to it.Ctrl+ICmd+I
Open terminal inline chatWith the terminal focused, the same key asks for a shell command instead.Ctrl+ICmd+I
Open Quick ChatA small prompt that takes the same # and @ mentions as the Chat view.Ctrl+Shift+Alt+LShift+Option+Cmd+L
Send promptSubmits what you typed to the agent, the same as the Send button.EnterReturn
Run suggested terminal commandIn terminal inline chat, executes the proposed command straight away.Ctrl+EnterCmd+Return
Insert suggested terminal commandPlaces the proposal at the terminal prompt so you can edit it first.Alt+EnterOption+Return

Chat navigation in VS Code 8

ActionWindows / LinuxMac
Find in chatSearches every prompt and response, including code blocks and content scrolled out of view.Ctrl+FCmd+F
Go to next matchWorks while Find is open; a collapsed steps section expands when the hit is inside it.EnterReturn
Go to previous matchSteps backwards through the Find results of the conversation.Shift+EnterShift+Return
Go to previous promptJumps back to the request you sent before this one.Ctrl+Alt+UpOption+Cmd+Up
Go to next promptJumps forward to the request that follows in the conversation.Ctrl+Alt+DownOption+Cmd+Down
Go to previous code blockMoves to the code sample above in the conversation.Ctrl+Alt+Page UpOption+Cmd+Page Up
Go to next code blockMoves to the code sample below in the conversation.Ctrl+Alt+Page DownOption+Cmd+Page Down
Open Accessible ViewLets a keyboard or screen reader read a response line by line; Linux uses Shift + Alt + F2.Alt+F2Option+F2

Agents window in VS Code 8

ActionWindows / LinuxMac
Start new sessionKeyboard equivalent of the New button in the sidebar of the Agents window.Ctrl+NCmd+N
Start new quick chatA quick chat is not tied to a workspace and is listed under Chats.Ctrl+KthenCtrl+NCmd+KthenCmd+N
Focus session by positionThe number is the session's place in the grid, counted from the left.Ctrl+1 to 9Cmd+1 to 9
Close all open sessionsNeeds a focused session and leaves you at the screen for starting one.Ctrl+KthenCtrl+WCmd+KthenCmd+W
Add chat to sessionOpens a blank chat inside the focused session; several chats appear as tabs.Ctrl+TCmd+T
Delete chatRemoves the focused chat for good; there is no way back.DeleteCmd+Backspace
Move focus between chat groupsApplies once chats have been split into groups to the right or below.Ctrl+KthenCtrl+LeftorCtrl+KthenCtrl+RightCmd+KthenCmd+LeftorCmd+KthenCmd+Right
Toggle sidebarHides or brings back the left sidebar, which holds the sessions list.Ctrl+BCmd+B

Chat commands and context in VS Code 13

ActionWindows / LinuxMac
Explain codeTyped in the chat box; describes how the code in the open editor works./explain/explain
Fix codeRequests a correction for whatever is wrong in the selection./fix/fix
Generate testsWrites unit tests that cover the selection./tests/tests
Generate docsUsed in editor inline chat to add documentation comments to the code./doc/doc
Fix failing testLooks for the cause of a test that fails and proposes a repair./fixTestFailure/fixTestFailure
Show chat helpPrints a short guide to the basics of Copilot in chat./help/help
Clear chatTyped in the chat box to begin a fresh session./clear/clear
Create new projectScaffolds a project rather than opening another conversation./new/new
Reference current fileChat variable that puts the open file's content into the prompt.#file#file
Reference selectionChat variable that adds the text highlighted in the editor.#selection#selection
Ask GitHub participantChat participant that brings GitHub-specific skills to the question.@github@github
Ask terminal participantChat participant for creating or debugging shell commands.@terminal@terminal
Ask VS Code participantChat participant for help with the editor's own commands and features.@vscode@vscode

JetBrains IDEs 6

ActionWindows / LinuxMac
Accept suggestion (JetBrains)Inserts the grey completion shown at the caret.TabTab
Dismiss suggestion (JetBrains)EscEsc
Next suggestion (JetBrains)GitHub's macOS table names the modifier as Option or Alt.Alt+]Option+]
Previous suggestion (JetBrains)Alt+[Option+[
Trigger suggestion (JetBrains)Requests a completion at the caret on demand.Alt+\Option+\
Open suggestions pane (JetBrains)Lists further completions in their own pane; VS Code uses Ctrl for this instead.Alt+EnterOption+Return

Visual Studio 2

ActionWindows / LinuxMac
Next suggestion (Visual Studio)Its command name in the Keyboard Shortcuts editor is Edit.NextSuggestion.Alt+.—
Previous suggestion (Visual Studio)Its command name in the Keyboard Shortcuts editor is Edit.PreviousSuggestion.Alt+,—

Eclipse 4

GitHub prints the Eclipse keys for Mac and Windows only; the table has no Linux bindings.

ActionWindows / LinuxMac
Accept suggestion (Eclipse)TabTab
Accept next word (Eclipse)Takes the completion one word at a time.Ctrl+RightCmd+Right
Dismiss suggestion (Eclipse)EscEsc
Trigger suggestion (Eclipse)Requests a completion on demand; Eclipse uses the slash key for it.Ctrl+Alt+/Option+Cmd+/

Xcode Mac only 3

ActionWindows / LinuxMac
Accept first line of suggestionIn Xcode the plain key takes one line only; add Option for the rest.—Tab
View full suggestionHold the key down to preview the whole completion before taking it.—Option
Accept full suggestionInserts every line of the completion, not just the first.—Option+Tab

Notes

Completions

Ghost text appears as you type; Tab accepts it and Esc dismisses it. When the first suggestion is half right, Ctrl + Right accepts one word at a time, and the alternatives are reachable with Alt + ] (next) and Alt + [ (previous). Ctrl + Enter opens a separate pane with additional suggestions, and Alt + \ asks for a suggestion when none appeared — the key to press after a comment describing what the next function should do. In VS Code Tab also jumps to a next edit suggestion elsewhere in the file and, pressed again, applies it.

Chat and its vocabulary

Ctrl + Alt + I opens the Chat view and Ctrl + I opens inline chat where the cursor is, for a change that stays within the surrounding code. Inside either, the slash commands set intent: /explain, /fix and /tests apply to the selection or the current file, and /doc adds documentation comments from inline chat. Context is added with references: #file attaches the current file and #selection the highlighted code, while a participant such as @github, @terminal or @vscode sends the question to a specialist. Naming the context explicitly grounds the request in specific code.

Edits across files

An agent can change several files in one request, and VS Code shows the result as diffs to review. The current VS Code documentation describes that review through the diff view, Source Control and, in older sessions, the Keep and Undo controls in the editor, but it lists no default keyboard shortcut for keeping or undoing an edit, so this page has none. Review before integrating the changes — checkpoints are temporary, and Git remains the permanent history.

Questions

How do I accept a GitHub Copilot suggestion?

Press Tab to accept the full suggestion, or Ctrl+Right Arrow to accept word by word.

How do I open Copilot inline chat?

Press Ctrl+I (Cmd+I on Mac) to open inline chat for contextual code editing.

How do I dismiss a Copilot suggestion?

Press Esc to dismiss the current suggestion.

How do I cycle through Copilot suggestions?

Press Alt+] for the next suggestion and Alt+[ for the previous one.

How do I open the Copilot chat panel in VS Code?

Press Ctrl+Alt+I (Ctrl+Cmd+I on Mac) to open the Chat view.

Sources and checks

Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.

4 rows from the earlier version of this page were removed in that check: duplicates, and bindings the documentation does not list or lists differently.

Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.