Copilot CLI reference - Keyboard shortcuts
Copilot CLI keyboard shortcuts
Copilot CLI documents 69 keyboard shortcuts, including @ FILENAME, # NUMBER and ! COMMAND. These work inside the Copilot CLI terminal UI. Each row gives the docs' description, accepted values and an example where one is documented.
Last verified 2 official pagesFull Copilot CLI reference
| Shortcut | Description |
|---|---|
@ FILENAME | Include file contents in the context. Docs: @ FILENAME |
# NUMBER | Include a GitHub issue or pull request in the context. Docs: # NUMBER |
! COMMAND | Execute a command in your local shell, bypassing Copilot. A lone ! enters shell mode; Esc or Ctrl+C on an empty prompt exits it. Docs: ! COMMAND |
$ | A lone $ plus Enter hands the terminal to a real interactive shell ($SHELL or %COMSPEC%) in the session directory; exit returns to the CLI. Disable with shellShortcut. Docs: $ |
? | Open quick help on an empty prompt; press again to dismiss and insert a literal ?. Docs: ? |
Esc | Cancel the current operation; press twice to interrupt the running turn or stop background agents, or to put an unanswered prompt back in the prompt box. Docs: Esc |
Ctrl+C | Cancel operation or clear input; press twice to exit. Docs: Ctrl+C |
Ctrl+D | Shutdown. In diff mode, scrolls down half a page. Docs: Ctrl+D |
Ctrl+G | Edit the prompt in an external editor ($EDITOR). Docs: Ctrl+G |
Ctrl+L | Clear the screen. Docs: Ctrl+L |
Ctrl+Enter or Ctrl+Q | Queue a message, shell command, or supported slash command to send while the agent is busy. Docs: Ctrl+Enter or Ctrl+Q |
Ctrl+R | Reverse search through command history. Docs: Ctrl+R |
Ctrl+Space | Toggle voice dictation (alias for Ctrl+X then v), if the terminal and OS pass it through. Docs: Ctrl+Space |
Ctrl+V | Paste from clipboard as an attachment. Docs: Ctrl+V |
Alt+V | Paste image from clipboard as an attachment. Docs: Alt+V |
Ctrl+X then / | Run a slash command after you have started typing a prompt, without retyping it. Docs: Ctrl+X then / |
Ctrl+X then e | Edit the prompt in an external editor ($EDITOR). Docs: Ctrl+X then e |
Ctrl+X then b | Promote the running task or shell command to the background. Docs: Ctrl+X then b |
Ctrl+X then g | Collapse or expand the autopilot goal panel. Docs: Ctrl+X then g |
Ctrl+X then h | Hide the current-session sidebar. Docs: Ctrl+X then h |
Ctrl+X then o | Open the most recent link from the timeline. Docs: Ctrl+X then o |
Ctrl+X then v | Toggle voice dictation on or off. Docs: Ctrl+X then v |
Ctrl+X then x | Close the current session. Docs: Ctrl+X then x |
Ctrl+Z | Suspend the process to the background (Unix). Docs: Ctrl+Z |
Shift+Enter or Option+Enter (Mac) / Alt+Enter (Windows/Linux) | Insert a newline in the input. Docs: Shift+Enter or Option+Enter (Mac) / Alt+Enter (Windows/Linux) |
Shift+Tab | Cycle between standard, plan, and autopilot mode. Docs: Shift+Tab |
Ctrl+F | Open timeline search; while typing, moves to the next character. Docs: Ctrl+F |
Ctrl+O | With an empty prompt, expand recent timeline items to show more details. Docs: Ctrl+O |
Ctrl+E | With an empty prompt, expand all timeline items; while typing, move to end of line. Before the first message, opens the local/cloud environment picker. Docs: Ctrl+E |
Ctrl+T | Expand or collapse display of reasoning in responses. Docs: Ctrl+T |
Page Up/Page Down | Scroll the timeline up or down by one page. Docs: Page Up/Page Down |
Ctrl+A | Move to beginning of the line when typing. Docs: Ctrl+A |
Ctrl+B | Move to the previous character. Docs: Ctrl+B |
Ctrl+H | Delete the previous character. Docs: Ctrl+H |
Ctrl+K | Delete from cursor to end of line, or the line break if at end of line. Docs: Ctrl+K |
Ctrl+U | Delete from cursor to beginning of the line. In diff mode, scrolls up half a page. Docs: Ctrl+U |
Ctrl+W | Delete the previous word. Docs: Ctrl+W |
Home / End | Move to the start or end of the current visual line. Docs: Home / End |
Ctrl+Home / Ctrl+End | Move to the start or end of the text. Docs: Ctrl+Home / Ctrl+End |
Alt+Left/Right (Windows/Linux), Option+Left/Right (Mac) | Move the cursor by a word. Docs: Alt+Left/Right (Windows/Linux), Option+Left/Right (Mac) |
Up/Down | Navigate command history; with an empty prompt, Up recalls the most recently queued or steering prompt if available. Docs: Up/Down |
Ctrl+P | Navigate submitted command history nondestructively, without queued-prompt recall. Docs: Ctrl+P |
Tab / Ctrl+Y | Accept the current inline completion suggestion. Docs: Tab / Ctrl+Y |
a (tasks dialog) | Toggle showing all nested subagent levels vs. this level's tasks only. Docs: a (tasks dialog) |
f (tasks dialog) | Toggle showing finished subagents and shells. Docs: f (tasks dialog) |
X (tasks dialog) | Kill the selected active task. Docs: X (tasks dialog) |
R (tasks dialog) | Remove the selected finished task. Docs: R (tasks dialog) |
B (tasks dialog) | Promote the selected sync task to background. Docs: B (tasks dialog) |
Enter (tasks dialog) | View task details, or teleport into the selected subagent's session view. Docs: Enter (tasks dialog) |
s (session picker) | Cycle the sort order: relevance, created, name, last used. Docs: s (session picker) |
Tab (session picker) | Switch between the local and remote tabs. Docs: Tab (session picker) |
x (session picker) | Delete the selected session. Docs: x (session picker) |
c (diff mode) | Add or edit a comment on the selected line; Enter submits all comments and s shows a comments summary. Docs: c (diff mode) |
b (diff mode) | Toggle between unstaged changes and branch diff. Docs: b (diff mode) |
w (diff mode) | Toggle hiding whitespace-only changes. Docs: w (diff mode) |
r (diff mode) | Refresh the diff (remote sessions only). Docs: r (diff mode) |
j/k, h/l, g/G (diff mode) | Move down/up one line, jump to previous/next file, and jump to first/last line (also arrow keys, Home, End). Docs: j/k, h/l, g/G (diff mode) |
Left/Right (sidebar) | With an empty prompt, walk the sidebar focus cycle: closed, timeline-focused, sidebar-focused (Vim h/l). Docs: Left/Right (sidebar) |
n (sidebar) | Start a new session from the focused sidebar or Sessions tab. Docs: n (sidebar) |
x, x (sidebar) | Close the selected session card, or delete a local resumable session's history in the Sessions tab. Docs: x, x (sidebar) |
s (sidebar) | Cycle the sidebar sort order: recent, created, name, none; persists across restarts. Docs: s (sidebar) |
a (Sessions tab) | Cycle the filter scope: all, local, remote (cloud). Docs: a (Sessions tab) |
/ (Sessions tab) | Search live across name, branch or working directory, repository, and session ID. Docs: / (Sessions tab) |
y (permission prompt) | Allow this specific request once. Docs: y (permission prompt) |
n (permission prompt) | Deny this specific request once. Docs: n (permission prompt) |
! (permission prompt) | Allow all similar requests for the rest of the session. Docs: ! (permission prompt) |
# (permission prompt) | Deny all similar requests for the rest of the session. Docs: # (permission prompt) |
? (permission prompt) | Show detailed information about the request. Docs: ? (permission prompt) |
R (/plugin Marketplace view) | Refresh every registered marketplace's catalog. Docs: R (/plugin Marketplace view) |
The rest of the Copilot CLI reference
FAQ
How many keyboard shortcuts does Copilot CLI have?
The official Copilot CLI docs list 69 keyboard shortcuts, including @ FILENAME, # NUMBER and ! COMMAND. All of them are in the table above, in the docs' order.
What does @ FILENAME do in Copilot CLI?
Include file contents in the context.
Where are Copilot CLI keyboard shortcuts documented?
On 2 official docs pages at docs.github.com, last read on October 17, 2026. Every row in the table links the exact section it came from.
More on Copilot CLI
- Copilot CLI in the tools directoryWhat it is, who makes it and how it fits next to other coding agents.
- Copilot CLI errors and fixes12 error messages, quoted verbatim, with the documented fix for each.
- GitHub Copilot premium requests and usage limitsPlan and tier limits for this tool, copied from the official docs.
Use other models in Copilot CLI
Setup guides from the model-in-tool directory, each with the env vars and base URL from official docs.
Sources
Last verified . Names and examples are copied verbatim from the 2 official pages below, and every row above links the exact section it came from.
Newsletter
Know when your tools change
One email per week. New coding agent releases, the flags and commands they add, and what they mean for how you work.