Cursor Keymap Reference

Complete list of keyboard shortcuts for Cursor Editor

Windows shortcuts shown as Ctrl, Mac shortcuts shown as

AI Commands

Chat with Cursor AI Ctrl + K
Edit Code with AI Ctrl + L
Generate Code with AI Ctrl + M
Explain Code with AI Ctrl + Shift + E
Fix Code with AI Ctrl + Shift + F

Chat

Submit with Codebase Ctrl + Enter
Submit without Context Enter
Select Previous Message
Add Selected Code as Context Ctrl + Shift + L
Open Chat History Ctrl + Alt + L

Composer

Cancel Generation Ctrl + Backspace
Accept All Changes Ctrl + Enter
Toggle Model Ctrl + Alt + /
New Composer Ctrl + N
Previous/Next Composer Ctrl + [ / ]

Tab Completion

Accept Suggestion Tab
Accept Next Word Ctrl + →

Terminal

Open Terminal Prompt Ctrl + K
Run Generated Command Ctrl + Enter
Accept Command Esc

Basic Editing

Quick File Navigation Ctrl + P
Command Palette Ctrl + Shift + P
Find in Files Ctrl + Shift + F
Quick Open Terminal Ctrl + `
Toggle Sidebar Ctrl + B

Code Navigation

Go to Definition F12
Go to Line Ctrl + G
Go Back Alt + ←
Go Forward Alt + →
Find References Shift + F12

Enhanced Editing

Multi-cursor Selection Alt + Click
Select All Occurrences Ctrl + Shift + L
Format Document Alt + Shift + F
Move Line Up Alt + ↑
Move Line Down Alt + ↓

File Operations

New File Ctrl + N
Save File Ctrl + S
Save All Files Ctrl + Alt + S
Close File Ctrl + W
Reopen Closed File Ctrl + Shift + T

Search & Replace

Find Ctrl + F
Replace Ctrl + H
Find Next F3
Find Previous Shift + F3
Replace All Ctrl + Alt + Enter

Code Selection

Select Current Line Ctrl + L
Select Current Word Ctrl + D
Select Next Match Ctrl + D (multiple)
Column Selection Alt + Click + Drag
Expand Selection Alt + Shift + →
Shrink Selection Alt + Shift + ←

Code Context

Go to Definition F12
Peek Definition Alt + F12
Find All References Shift + F12
Go to Symbol Ctrl + Shift + O
Go to Line/Column Ctrl + G
Quick Fix Ctrl + .

Pro Tip

You can customize these keyboard shortcuts in Cursor's settings. Open Command Palette (Ctrl + Shift + P) and type "Keyboard Shortcuts" to view and modify them.

Coming from JetBrains IDE?

If you're migrating from JetBrains IDEs (IntelliJ, WebStorm, PyCharm, etc.), you can use the JetBrains IDE Keymap extension to keep your familiar keyboard shortcuts.