Cursor Keyboard Shortcuts Cheat Sheet
The complete keyboard shortcuts reference for Cursor and VS Code, organized by task. Master productivity shortcuts including Cursor's powerful AI commands (Cmd+K, Cmd+L) for faster development, with Mac and Windows keys. Updated 2026.
Cursor AI Commands
Cursor-specific AI shortcuts layered on top of VS Code. These are the bindings that change most often, so they're verified against Cursor's official keyboard shortcuts docs.
Open Agent / Composer
Toggle the AI side panel to run the agent for multi-file edits and complex tasks. (Cmd + E toggles the dedicated Agent layout.)
| Mac | Cmd + I |
| Windows/Linux | Ctrl + I |
Open Chat
Toggle the AI side panel to ask questions about your code.
| Mac | Cmd + L |
| Windows/Linux | Ctrl + L |
Inline Edit
Open the inline AI editor to generate or modify code in place. In the terminal, the same key opens the AI command prompt bar instead.
| Mac | Cmd + K |
| Windows/Linux | Ctrl + K |
Switch Mode (Agent / Ask / Plan)
Open the mode menu to switch how the AI behaves.
| Mac | Cmd + . |
| Windows/Linux | Ctrl + . |
Cycle AI Model
Loop between the available AI models.
| Mac | Cmd + / |
| Windows/Linux | Ctrl + / |
Add Selection to Chat
Send the selected code into the current chat as context (Cmd + L adds it to a new chat instead).
| Mac | Cmd + Shift + L |
| Windows/Linux | Ctrl + Shift + L |
Accept / Reject AI Changes
Apply or discard the AI's suggested changes across the chat.
| Mac | Cmd + Enter (Accept all) Cmd + Delete (Reject all) |
| Windows/Linux | Ctrl + Enter (Accept all) Ctrl + Backspace (Reject all) |
Accept Tab Suggestion
Accept the current Tab autocomplete suggestion. Use Esc to dismiss it.
| All platforms | Tab (Accept) Esc (Dismiss) |
Accept Next Word
Accept just the next word of a Tab suggestion — useful for partial accepts.
| Mac | Cmd + → |
| Windows/Linux | Ctrl + → |
Terminal AI Command
In the integrated terminal, generate a shell command from natural language, then run it.
| Mac | Cmd + K (Prompt) Cmd + Enter (Run) |
| Windows/Linux | Ctrl + K (Prompt) Ctrl + Enter (Run) |
Workflows That Compound
The shortcuts pay off most when chained. Three combinations worth building into muscle memory:
- Targeted edit: Select code → Cmd + K → describe the change → Enter → Cmd + Enter to accept the diff.
- Ground a question in your codebase: Cmd + L → type
@Codebasethen your question. Cursor runs a semantic search and answers with citations. - Generate a terminal command: Focus the terminal → Cmd + K → describe it in plain English → Cmd + Enter to run.
All Cursor shortcuts are remappable: Cmd + Shift + P → "Keyboard Shortcuts", or edit keybindings.json directly.
Essential Editing
Fundamental shortcuts for code editing and manipulation.
Cut, Copy, Paste Line
Cut, copy, or paste entire lines without selection.
| Mac | Cmd + X (Cut) Cmd + C (Copy) Cmd + V (Paste) |
| Windows/Linux | Ctrl + X (Cut) Ctrl + C (Copy) Ctrl + V (Paste) |
Tip: Without selection, cuts/copies entire line
Duplicate Line
Duplicate current line or selection above or below.
| Mac | Shift + Option + ↑ / ↓ |
| Windows/Linux | Shift + Alt + ↑ / ↓ |
Move Line Up/Down
Move current line or selection up or down.
| Mac | Option + ↑ / ↓ |
| Windows/Linux | Alt + ↑ / ↓ |
Delete Line
Delete entire line.
| Mac | Cmd + Shift + K |
| Windows/Linux | Ctrl + Shift + K |
Insert Line Below/Above
Insert new line below or above current line.
| Mac | Cmd + Enter (Below) Cmd + Shift + Enter (Above) |
| Windows/Linux | Ctrl + Enter (Below) Ctrl + Shift + Enter (Above) |
Comment/Uncomment Line
Toggle line comment.
| Mac | Cmd + / |
| Windows/Linux | Ctrl + / |
Block Comment
Toggle block comment.
| Mac | Shift + Option + A |
| Windows/Linux | Shift + Alt + A |
Indent/Outdent
Indent or outdent line/selection.
| Mac | Cmd + ] (Indent) Cmd + [ (Outdent) |
| Windows/Linux | Ctrl + ] (Indent) Ctrl + [ (Outdent) |
Format Document
Auto-format entire document.
| Mac | Shift + Option + F |
| Windows/Linux | Shift + Alt + F |
Format Selection
Format only selected code.
| Mac | Cmd + K then Cmd + F |
| Windows/Linux | Ctrl + K then Ctrl + F |
Multi-Cursor Editing
Edit multiple locations simultaneously for maximum productivity.
Add Cursor Above/Below
Add additional cursor on lines above or below.
| Mac | Cmd + Option + ↑ / ↓ |
| Windows/Linux | Ctrl + Alt + ↑ / ↓ |
Add Cursor at Click Position
Add cursor wherever you click.
| Mac | Option + Click |
| Windows/Linux | Alt + Click |
Select All Occurrences
Select all occurrences of current word/selection.
| Mac | Cmd + Shift + L |
| Windows/Linux | Ctrl + Shift + L |
Select Next Occurrence
Add next occurrence of selection to multi-cursor.
| Mac | Cmd + D |
| Windows/Linux | Ctrl + D |
Skip Next Occurrence
Skip current occurrence and move to next.
| Mac | Cmd + K then Cmd + D |
| Windows/Linux | Ctrl + K then Ctrl + D |
Column (Box) Selection
Select rectangular region of text.
| Mac | Shift + Option + Drag |
| Windows/Linux | Shift + Alt + Drag |
Search & Replace
Powerful search and replace functionality across files.
Find in File
Search within current file.
| Mac | Cmd + F |
| Windows/Linux | Ctrl + F |
Find & Replace in File
Search and replace within current file.
| Mac | Option + Cmd + F |
| Windows/Linux | Ctrl + H |
Find in Files
Search across all files in workspace.
| Mac | Cmd + Shift + F |
| Windows/Linux | Ctrl + Shift + F |
Replace in Files
Replace across all files in workspace.
| Mac | Cmd + Shift + H |
| Windows/Linux | Ctrl + Shift + H |
Find Next/Previous
Navigate through search results.
| Mac | Cmd + G (Next) Cmd + Shift + G (Previous) |
| Windows/Linux | F3 (Next) Shift + F3 (Previous) |
Select All Find Matches
Select all occurrences of current search.
| Mac | Option + Enter |
| Windows/Linux | Alt + Enter |
Command Palette
Access all commands and features through the command palette.
Show Command Palette
Open command palette to access all commands.
| Mac | Cmd + Shift + P |
| Windows/Linux | Ctrl + Shift + P |
Settings
Open settings UI or JSON.
| Mac | Cmd + , |
| Windows/Linux | Ctrl + , |
Keyboard Shortcuts
Open keyboard shortcuts editor.
| Mac | Cmd + K then Cmd + S |
| Windows/Linux | Ctrl + K then Ctrl + S |
Terminal
Integrated terminal shortcuts for command-line work.
Toggle Terminal
Show/hide integrated terminal.
| All platforms | Ctrl + ` |
Create New Terminal
Open new terminal instance.
| All platforms | Ctrl + Shift + ` |
Focus Terminal
Move focus to terminal pane.
| Mac | Cmd + J |
| Windows/Linux | Ctrl + J |
Kill Terminal
Close active terminal instance.
| Mac | Cmd + W (in terminal) |
| Windows/Linux | Ctrl + W (in terminal) |
Split Terminal
Split terminal pane.
| Mac | Cmd + \ (in terminal) |
| Windows/Linux | Ctrl + Shift + 5 |
Display & Layout
Manage editor layout and visibility.
Toggle Sidebar
Show/hide sidebar (file explorer).
| Mac | Cmd + B |
| Windows/Linux | Ctrl + B |
Toggle Panel
Show/hide bottom panel (terminal, problems, output).
| Mac | Cmd + J |
| Windows/Linux | Ctrl + J |
Zen Mode
Enter distraction-free full-screen mode.
| Mac | Cmd + K then Z |
| Windows/Linux | Ctrl + K then Z |
Split Editor
Split editor vertically.
| Mac | Cmd + \ |
| Windows/Linux | Ctrl + \ |
Focus Editor Group
Switch focus between split editors.
| Mac | Cmd + 1 / 2 / 3 |
| Windows/Linux | Ctrl + 1 / 2 / 3 |
Zoom In/Out
Increase/decrease editor zoom level.
| Mac | Cmd + = (In) Cmd + - (Out) |
| Windows/Linux | Ctrl + = (In) Ctrl + - (Out) |
File Management
Manage files and editor tabs efficiently.
New File
Create new untitled file.
| Mac | Cmd + N |
| Windows/Linux | Ctrl + N |
Open File
Open file dialog.
| Mac | Cmd + O |
| Windows/Linux | Ctrl + O |
Save File
Save current file.
| Mac | Cmd + S |
| Windows/Linux | Ctrl + S |
Save As
Save file with new name/location.
| Mac | Cmd + Shift + S |
| Windows/Linux | Ctrl + Shift + S |
Save All
Save all open files.
| Mac | Option + Cmd + S |
| Windows/Linux | Ctrl + K then S |
Close Editor
Close current editor tab.
| Mac | Cmd + W |
| Windows/Linux | Ctrl + W |
Close All Editors
Close all open editor tabs.
| Mac | Cmd + K then W |
| Windows/Linux | Ctrl + K then W |
Reopen Closed Editor
Reopen last closed editor tab.
| Mac | Cmd + Shift + T |
| Windows/Linux | Ctrl + Shift + T |
Copy Path
Copy file path to clipboard.
| Mac | Cmd + K then P |
| Windows/Linux | Ctrl + K then P |
Reveal in File Explorer
Show file in sidebar.
| Mac | Cmd + K then R |
| Windows/Linux | Ctrl + K then R |
Refactoring
Code refactoring and symbol manipulation.
Rename Symbol
Rename symbol across all references.
| All platforms | F2 |
Quick Fix
Show available quick fixes and refactorings.
| Mac | Cmd + . |
| Windows/Linux | Ctrl + . |
Show Hover
Show hover information (type info, docs).
| Mac | Cmd + K then Cmd + I |
| Windows/Linux | Ctrl + K then Ctrl + I |
Trigger Suggest
Manually trigger IntelliSense suggestions.
| All platforms | Ctrl + Space |
Trigger Parameter Hints
Show function parameter hints.
| Mac | Cmd + Shift + Space |
| Windows/Linux | Ctrl + Shift + Space |
Debugging
Debug your code with breakpoints and step-through execution.
Toggle Breakpoint
Add/remove breakpoint on current line.
| All platforms | F9 |
Start/Continue Debugging
Start debugging or continue to next breakpoint.
| All platforms | F5 |
Step Over
Execute current line and move to next.
| All platforms | F10 |
Step Into
Step into function calls.
| All platforms | F11 |
Step Out
Step out of current function.
| All platforms | Shift + F11 |
Stop Debugging
Stop debug session.
| All platforms | Shift + F5 |
Show Problems
Open problems panel (errors, warnings).
| Mac | Cmd + Shift + M |
| Windows/Linux | Ctrl + Shift + M |
Emmet Abbreviations
Rapid HTML/CSS generation with Emmet shortcuts.
Expand Abbreviation
Expand Emmet abbreviation into full code.
| All platforms | Tab |
<!-- Before: ul>li*5 -->
<!-- After Tab: -->
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
Common Emmet Patterns
// Child: >
div>ul>li
// Sibling: +
div+p+span
// Climb up: ^
div>ul>li^div
// Multiply: *
ul>li*3
// Grouping: ()
div>(header>ul>li*2)+footer>p
// ID and Class
div#header.container.main
// Attributes
a[href="#" title="Link"]
// Text: {}
li{Item $}*3
// CSS Properties
m10 → margin: 10px;
p20-30 → padding: 20px 30px;
w100p → width: 100%;
Pro Tips
- Customize shortcuts: Open Settings → Keyboard Shortcuts → Search for any command
- Format on Save: Enable in Settings → "Format on Save"
- Auto Save: Settings → Files: Auto Save → "afterDelay"
- Workspace settings: Create
.vscode/settings.jsonin project root - Custom snippets: Cmd/Ctrl + Shift + P → "Configure User Snippets"
- Cursor AI Tips: Use Cmd+K with selected code for targeted inline edits, Cmd+I to open the agent for multi-file work, and @-mention files or @Codebase in chat to add context