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.
| Action | Windows / Linux | Mac |
|---|---|---|
| Accept suggestionInserts the ghost text shown at the cursor into the file. | Tab | Tab |
| Dismiss suggestionHides the ghost text and leaves the code unchanged. | Esc | Esc |
| 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+Enter | Ctrl+Return |
| Accept next wordTakes part of the ghost text only: its next word, or its next line. | Ctrl+Right | Cmd+Right |
| Go to next edit suggestionMoves the cursor to the place where an edit is predicted; a second press applies it. | Tab | Tab |
Chat in VS Code 8
| Action | Windows / Linux | Mac |
|---|---|---|
| Open Chat viewShows the panel where conversations with an agent take place. | Ctrl+Alt+I | Ctrl+Cmd+I |
| Start new chatBegins a fresh conversation, useful when the next task is unrelated. | Ctrl+N | Cmd+N |
| Open editor inline chatPuts a prompt box inside the editor; select code first to limit the request to it. | Ctrl+I | Cmd+I |
| Open terminal inline chatWith the terminal focused, the same key asks for a shell command instead. | Ctrl+I | Cmd+I |
| Open Quick ChatA small prompt that takes the same # and @ mentions as the Chat view. | Ctrl+Shift+Alt+L | Shift+Option+Cmd+L |
| Send promptSubmits what you typed to the agent, the same as the Send button. | Enter | Return |
| Run suggested terminal commandIn terminal inline chat, executes the proposed command straight away. | Ctrl+Enter | Cmd+Return |
| Insert suggested terminal commandPlaces the proposal at the terminal prompt so you can edit it first. | Alt+Enter | Option+Return |
Agents window in VS Code 8
| Action | Windows / Linux | Mac |
|---|---|---|
| Start new sessionKeyboard equivalent of the New button in the sidebar of the Agents window. | Ctrl+N | Cmd+N |
| Start new quick chatA quick chat is not tied to a workspace and is listed under Chats. | Ctrl+KthenCtrl+N | Cmd+KthenCmd+N |
| Focus session by positionThe number is the session's place in the grid, counted from the left. | Ctrl+1 to 9 | Cmd+1 to 9 |
| Close all open sessionsNeeds a focused session and leaves you at the screen for starting one. | Ctrl+KthenCtrl+W | Cmd+KthenCmd+W |
| Add chat to sessionOpens a blank chat inside the focused session; several chats appear as tabs. | Ctrl+T | Cmd+T |
| Delete chatRemoves the focused chat for good; there is no way back. | Delete | Cmd+Backspace |
| Move focus between chat groupsApplies once chats have been split into groups to the right or below. | Ctrl+KthenCtrl+LeftorCtrl+KthenCtrl+Right | Cmd+KthenCmd+LeftorCmd+KthenCmd+Right |
| Toggle sidebarHides or brings back the left sidebar, which holds the sessions list. | Ctrl+B | Cmd+B |
Chat commands and context in VS Code 13
| Action | Windows / Linux | Mac |
|---|---|---|
| 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
| Action | Windows / Linux | Mac |
|---|---|---|
| Accept suggestion (JetBrains)Inserts the grey completion shown at the caret. | Tab | Tab |
| Dismiss suggestion (JetBrains) | Esc | Esc |
| 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+Enter | Option+Return |
Visual Studio 2
| Action | Windows / Linux | Mac |
|---|---|---|
| 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.
| Action | Windows / Linux | Mac |
|---|---|---|
| Accept suggestion (Eclipse) | Tab | Tab |
| Accept next word (Eclipse)Takes the completion one word at a time. | Ctrl+Right | Cmd+Right |
| Dismiss suggestion (Eclipse) | Esc | Esc |
| Trigger suggestion (Eclipse)Requests a completion on demand; Eclipse uses the slash key for it. | Ctrl+Alt+/ | Option+Cmd+/ |
Xcode Mac only 3
| Action | Windows / Linux | Mac |
|---|---|---|
| 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 |
No row on this page matches that filter.
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
- GitHub Docs — Keyboard shortcuts for GitHub Copilot in the IDE Inline suggestion keys in VS Code, JetBrains IDEs, Visual Studio, Eclipse and Xcode
- Visual Studio Code Docs — AI features cheat sheet Chat shortcuts in VS Code and the /doc command
- Visual Studio Code Docs — Inline suggestions from GitHub Copilot in VS Code Partial accept and next edit suggestions in VS Code
- Visual Studio Code Docs — Inline chat and Quick Chat Terminal inline chat keys in VS Code
- Visual Studio Code Docs — Use chat in VS Code Sending, searching and navigating a chat in VS Code
- Visual Studio Code Docs — Use the Agents window Session keys in the VS Code Agents window
- Visual Studio Code Docs — Manage agent sessions in VS Code Chat tabs, chat groups and the sidebar in the Agents window
- GitHub Docs — GitHub Copilot Chat cheat sheet (Visual Studio Code tab) Slash commands, chat variables and chat participants in VS Code
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.