Cursor AI Keyboard Shortcuts: A Developer Guide (2026)
Cursor AI is a code editor for developers who want AI built directly into their workflow. Instead of sitting in a separate tool, the AI is reached from the editor itself. Learning its keyboard shortcuts is the difference between a good Cursor experience and a great one.
Table of Contents
1. Core AI shortcuts at a glance
| Windows / Linux | Mac | What it does |
|---|---|---|
| Ctrl + K | Cmd + K | AI Inline Edit — modify selected code with natural language |
| Ctrl + L | Cmd + L | Toggle the Agent side panel (with code selected, starts a new chat with that selection) |
| Ctrl + I | Cmd + I | Toggle the Agent side panel |
| Tab | Tab | Accept AI suggestion |
| Escape | Escape | Reject AI suggestion |
| Ctrl + Shift + L | Cmd + Shift + L | Add the selected code to Chat as context |
2. Inline Edit (Ctrl+K) — your most-used shortcut
Ctrl+K is the heart of Cursor. Select any code, press Ctrl+K, describe what you want in plain English, and Cursor rewrites it. No context switching, no copy-paste into a chat window.
| Action | How to do it |
|---|---|
| Edit selected code | Select code → Ctrl+K → describe the change |
| Apply the instruction | Enter (Return on a Mac) |
| Cancel the edit | Ctrl+Shift+Backspace (Cmd+Shift+Backspace on a Mac) |
| Iterate on the result | Add a follow-up instruction and press Enter again |
| Ask a question instead of editing | Alt+Enter (Option+Return on a Mac) in the edit box |
3. AI Chat (Ctrl+L) — for discussions and exploration
Ctrl+L toggles the side panel where the chat with Agent lives; with code selected, it starts a new chat that carries the selection. Unlike Inline Edit, Chat preserves the conversation history and is better for exploratory questions, understanding code, and working through complex problems step by step.
| Windows / Linux | Mac | What it does |
|---|---|---|
| Ctrl + L | Cmd + L | Toggle the side panel (chat) |
| Ctrl + N / Ctrl + R | Cmd + N / Cmd + R | New chat |
| Ctrl + Shift + L | Cmd + Shift + L | Add the selected code to the chat as context |
| @ in chat | @ in chat | Attach a file, folder, or other context with an @-mention |
| Enter | Return | Send message — queued until the agent finishes its current task |
| Ctrl + Enter | Cmd + Return | Send the message at once instead of queueing it |
@filename.ts to add a file as context. Use this for "explain this code" or "what does this function do" queries.4. Agent (Ctrl+I) — for multi-file changes
Ctrl+I toggles the side panel, which is where Agent runs. Cursor's docs describe Agent as the assistant that can complete complex coding tasks independently, run terminal commands, and edit code.
| Windows / Linux | Mac | What it does |
|---|---|---|
| Ctrl + I | Cmd + I | Toggle the Agent side panel |
| Ctrl + Enter | Cmd + Return | Accept all suggested changes |
| Ctrl + Shift + Backspace | Cmd + Shift + Backspace | Reject all suggested changes |
5. Editor navigation shortcuts
Cursor's help says it uses the same default shortcuts as VS Code, so the editor keys below are VS Code's own:
| Windows / Linux | Mac | What it does |
|---|---|---|
| Ctrl + P | Cmd + P | Quick Open file |
| Ctrl + Shift + P | Cmd + Shift + P | Command Palette |
| Ctrl + ` | Ctrl + ` | Toggle terminal |
| Ctrl + B | Cmd + B | Toggle sidebar |
| Ctrl + S | Cmd + S | Save file |
| Ctrl + Z | Cmd + Z | Undo |
| Ctrl + Y | Cmd + Shift + Z | Redo |
6. Effective Cursor workflow patterns
The TDD pattern with Cursor
Write a test first (describe the expected behavior), then select it and press Ctrl+L to open Agent with the test as context: "implement the function that makes this test pass." The agent works from the test you selected.
Code review pattern
Select any block of code, open Chat (Ctrl+L), and ask "what does this do, and are there any potential bugs?" The selected block goes along as context for the question.
Refactor with confidence
Select a function you want to refactor, press Ctrl+K, and type "refactor this to use async/await" or "extract this into smaller functions." Press Enter to apply it, add a follow-up instruction to refine it, or cancel with Ctrl+Shift+Backspace.
Interactive shortcut reference
View the Cursor AI Shortcuts Reference