Editor
Keyboard Shortcuts
本文档内容均由官方文档翻译,仅供个人学习,如有错误请以官网文档为准!
官网网址:www.cursor.com
官网网址:www.cursor.com
A comprehensive guide to Cursor keyboard shortcuts for Chat, Composer, Tab and Agent
A high level overview of the keyboard shortcuts and keybindings in Cursor. You can see all keyboard shortcuts by pressing Cmd + R then Cmd + S.
To learn more about Keyboard Shortcuts in Cursor, check out the Key Bindings for VS Code as it serves as a good baseline for Cursor’s keybindings.
All of Cursor’s keybindings, including those for Cursor-specific features, can be remapped in the Keyboard Shortcuts settings page.
All
Cmd keys can be replaced with Ctrl on Windows.General
| Shortcut | Action |
|---|---|
| Cmd + I | Open Agent |
| Cmd + L | Open Ask |
| Cmd + . | Toggle Chat Modes |
| Cmd + / | Loop between AI models |
| Cmd + Shift + J | Open Cursor settings |
| Cmd + , | Open General settings |
| Cmd + Shift + P | Open command palette |
Chat - Agent, Edit & Ask
These shortcuts work while focused on the chat input box.
| Shortcut | Action |
|---|---|
| Enter | Submit |
| Cmd + Backspace | Cancel generation |
| Cmd + L with code selected | Add selected code as context |
| Cmd + Shift + L with code selected | Add selected code as context |
| Cmd + Enter | Accept all changes |
| Cmd + Backspace | Reject all changes |
| Tab | Cycle to next message |
| Shift + Tab | Cycle to previous message |
| Cmd + Alt + / | Open model toggle |
| Cmd + N / Cmd + R | Create new chat |
| Cmd + Shift + K | Open composer as bar |
| Cmd + [ | Open previous chat |
| Cmd + ] | Open next chat |
| Cmd + W | Close chat |
| Esc | Unfocus the field |
Cmd+K
| Shortcut | Action |
|---|---|
| Cmd + K | Open |
| Cmd + Shift + K | Toggle input focus |
| Enter | Submit |
| Cmd + Backspace | Cancel |
| Option + Enter | Ask quick question |
Code Selection & Context
| Shortcut | Action |
|---|---|
| @ | @-symbols |
| # | Files |
| / | Shortcut Commands |
| Cmd + Shift + L | Add selection to Chat |
| Cmd + Shift + K | Add selection to Edit |
| Cmd + L | Add selection to new chat |
| Cmd + M | Toggle file reading strategies |
| Cmd + → | Accept next word of suggestion |
| Cmd + Enter | Search codebase in chat |
| Select code, Cmd + C, Cmd + V | Add copied reference code as context |
| Select code, Cmd + C, Cmd + Shift + V | Add copied code as text context |
Tab
| Shortcut | Action |
|---|---|
| Tab | Accept suggestion |
| Cmd + → | Accept next word |
Terminal
| Shortcut | Action |
|---|---|
| Cmd + K | Open terminal prompt bar |
| Cmd + Enter | Run generated command |
| Esc | Accept command |