Cursor Keyboard Shortcuts: The Complete Cheat Sheet
Cursor is built for speed. If you're still clicking through menus to trigger AI features, you're leaving productivity on the table. This guide covers every shortcut that matters.
CMD+K (Ctrl+K) - Inline Editing
This is the workhorse shortcut. Press it anywhere with code selected (or not) to open the inline AI editor.
What it does:
- With selection: transforms the selected code based on your instruction
- Without selection: opens a floating input to generate code at cursor position
Examples:
// Select this function, press CMD+K, type "add error handling"
function fetchUser(id) {
return api.get(`/users/${id}`);
}
// Cursor at empty line, press CMD+K, type "React useState hook for counter"
const [count, setCount] = useState(0);
CMD+K remembers your last few prompts. Press Up arrow in the input to cycle through history.
CMD+K in Terminal
Yes, it works in the integrated terminal too. Select a command output, press CMD+K, and ask for explanations or transformations.
CMD+L (Ctrl+L) - Chat Panel
Opens the AI chat sidebar. This is where you ask questions about your codebase, get explanations, or plan refactors.
Key behaviors:
- If text is selected, it's automatically included as context
- You can
@mentionfiles, folders, or code symbols - Chat history persists per workspace
CMD+L toggles the panel. If it's already open, it closes it. This is faster than clicking the sidebar icon.
Chat panel shortcuts
Inside the chat panel:
| Shortcut | Action |
|---|---|
Enter | Send message |
Shift+Enter | New line in input |
Up (empty input) | Edit last message |
Escape | Close panel |
CMD+I (Ctrl+I) - Composer
Composer is Cursor's multi-file editing mode. It's like CMD+K but can modify several files in one go.
When to use it:
- Refactoring that touches multiple files
- Adding a feature that needs changes across the stack
- Generating boilerplate (component + test + storybook)
How it works:
- Press CMD+I
- Describe what you want
- Cursor proposes a plan with file-by-file changes
- Review each change, accept or reject individually
Composer can create new files and delete existing ones. Always review the full plan before accepting.
CMD+Enter - Accept Suggestion
When Cursor shows a gray "ghost text" suggestion, press CMD+Enter to accept it.
Alternative ways to interact with suggestions:
| Action | Shortcut |
|---|---|
| Accept word by word | Ctrl+Right Arrow |
| Accept full suggestion | CMD+Enter |
| Dismiss suggestion | Escape |
| Show next suggestion | Alt+] |
| Show previous suggestion | Alt+[ |
If you only want the next word of a suggestion, use Ctrl+Right Arrow instead of accepting everything. It's more precise.
Customizing Shortcuts
Cursor inherits VS Code's keybinding system, so customization is straightforward.
Open keyboard shortcuts
CMD+K CMD+S (Ctrl+K Ctrl+S) - this opens the keybindings editor.
Or: Command Palette → "Preferences: Open Keyboard Shortcuts"
Common customizations
Change CMD+K to something else (if it conflicts with your terminal):
- Search for "Cursor Inline Edit" in keybindings
- Click the binding, press your new shortcut
- Example: rebind to
CMD+Shift+K
Add a shortcut for "Accept All" in Composer:
- Search for "Composer: Accept All"
- Bind to
CMD+Shift+Enter
JSON keybindings file
For advanced customization, edit keybindings.json directly:
[
{
"key": "ctrl+shift+k",
"command": "cursor.inlineEdit",
"when": "editorTextFocus"
},
{
"key": "ctrl+shift+l",
"command": "cursor.chat.toggle",
"when": "editorTextFocus"
}
]
Open it via Command Palette → "Preferences: Open Keyboard Shortcuts (JSON)"
Efficiency Workflows: Combining Shortcuts
The real speed comes from chaining shortcuts without touching the mouse.
Workflow 1: Quick fix loop
- See an error in your code
- Select the problematic line
CMD+K→ type "fix this error" →Enter- Review suggestion →
CMD+Enterto accept
Total time: under 5 seconds.
Workflow 2: Explore then implement
CMD+Lopen chat- Ask about a pattern: "how do we handle auth in this project?"
- See a file mentioned in the response
Escapeto close chat,CMD+Pto open the file- Read it, then
CMD+Kto implement something similar
Workflow 3: Multi-file refactor
CMD+Iopen Composer- Describe the refactor
- Review the plan
CMD+Enterto accept all (if you're confident)- Or navigate changes with
Taband accept individually
Learn CMD+P (Quick Open) and CMD+Shift+F (Global Search) if you haven't already. They're not Cursor-specific, but they complete the no-mouse workflow.
Complete Shortcut Reference
| Shortcut | macOS | Windows/Linux | Description |
|---|---|---|---|
| Inline Edit | CMD+K | Ctrl+K | AI edit at cursor/selection |
| Chat Panel | CMD+L | Ctrl+L | Toggle AI chat |
| Composer | CMD+I | Ctrl+I | Multi-file AI editing |
| Accept Suggestion | CMD+Enter | Ctrl+Enter | Accept ghost text |
| Accept Word | Ctrl+Right | Ctrl+Right | Accept one word of suggestion |
| Next Suggestion | Alt+] | Alt+] | Cycle forward through suggestions |
| Previous Suggestion | Alt+[ | Alt+[ | Cycle backward through suggestions |
| Cancel / Dismiss | Escape | Escape | Close panel or dismiss suggestion |
| Quick Open | CMD+P | Ctrl+P | Open file by name |
| Global Search | CMD+Shift+F | Ctrl+Shift+F | Search across files |
| Command Palette | CMD+Shift+P | Ctrl+Shift+P | Run any command |
| Keyboard Shortcuts | CMD+K CMD+S | Ctrl+K Ctrl+S | Edit keybindings |

Print this out or keep it visible until the shortcuts become muscle memory.
Summary
CMD+Kfor inline edits - your most-used shortcutCMD+Lfor chat - ask questions, get explanationsCMD+Ifor Composer - multi-file changesCMD+Enterto accept suggestions- Customize anything that conflicts with your existing workflow
Spend 10 minutes intentionally using these shortcuts on your next task. After a day, you'll be faster than you were with mouse-driven AI features.