Cursor AI Keyboard Shortcuts: The Complete Developer Guide (2026)
Published: May 1, 2026 · 8 min read
Cursor AI has become the code editor of choice for developers who want AI built directly into their workflow. Unlike using a separate AI tool, Cursor integrates AI into every editing action. 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 | Open AI Chat sidebar |
| Ctrl + I | Cmd + I | Open Composer (multi-file AI edits) |
| Tab | Tab | Accept AI suggestion |
| Escape | Escape | Reject AI suggestion |
| Ctrl + Shift + L | Cmd + Shift + L | Start new AI chat |
| Ctrl + Shift + I | Cmd + Shift + I | Open Composer in new window |
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 |
| Generate new code | Place cursor → Ctrl+K → describe what to generate |
| Accept the change | Tab (or click Accept) |
| Reject the change | Escape (or click Reject) |
| Iterate on the result | Ctrl+K again after accepting to refine further |
3. AI Chat (Ctrl+L) — for discussions and exploration
Ctrl+L opens the AI Chat panel. 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 | Open Chat |
| Ctrl + Shift + L | Cmd + Shift + L | New Chat (clear history) |
| @ in chat | @ in chat | Reference a file, folder, or symbol |
| Enter | Enter | Send message |
| Shift + Enter | Shift + Enter | New line in chat input |
@filename.ts to add a file as context. The AI can read the full file and answer questions about it. Use this for "explain this code" or "what does this function do" queries.4. Composer (Ctrl+I) — for multi-file changes
The Composer is Cursor's most powerful feature. It can read and edit multiple files simultaneously, run terminal commands, and complete multi-step tasks autonomously in Agent mode.
| Windows / Linux | Mac | What it does |
|---|---|---|
| Ctrl + I | Cmd + I | Open Composer |
| Ctrl + Enter | Cmd + Enter | Accept all Composer changes |
| Ctrl + Backspace | Cmd + Backspace | Reject all Composer changes |
5. Editor navigation shortcuts
| 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 + / | Cmd + / | Toggle comment |
| Ctrl + S | Cmd + S | Save file |
| Ctrl + Z | Cmd + Z | Undo |
| Ctrl + Shift + Z | 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+K: "implement the function that makes this test pass." Cursor reads the test and generates the implementation. Faster than writing the implementation yourself and explaining it separately.
Code review pattern
Select any block of code, open Chat (Ctrl+L), and ask "what does this do, and are there any potential bugs?" Cursor explains the code and flags issues. More effective than reading unfamiliar code alone.
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." Preview the diff before accepting — Cursor shows exactly what will change.
Interactive shortcut reference
View All Cursor AI Shortcuts