Skip to main content

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);
tip

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 @mention files, folders, or code symbols
  • Chat history persists per workspace
info

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:

ShortcutAction
EnterSend message
Shift+EnterNew line in input
Up (empty input)Edit last message
EscapeClose 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:

  1. Press CMD+I
  2. Describe what you want
  3. Cursor proposes a plan with file-by-file changes
  4. Review each change, accept or reject individually
warning

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:

ActionShortcut
Accept word by wordCtrl+Right Arrow
Accept full suggestionCMD+Enter
Dismiss suggestionEscape
Show next suggestionAlt+]
Show previous suggestionAlt+[
tip

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):

  1. Search for "Cursor Inline Edit" in keybindings
  2. Click the binding, press your new shortcut
  3. Example: rebind to CMD+Shift+K

Add a shortcut for "Accept All" in Composer:

  1. Search for "Composer: Accept All"
  2. 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

  1. See an error in your code
  2. Select the problematic line
  3. CMD+K → type "fix this error" → Enter
  4. Review suggestion → CMD+Enter to accept

Total time: under 5 seconds.

Workflow 2: Explore then implement

  1. CMD+L open chat
  2. Ask about a pattern: "how do we handle auth in this project?"
  3. See a file mentioned in the response
  4. Escape to close chat, CMD+P to open the file
  5. Read it, then CMD+K to implement something similar

Workflow 3: Multi-file refactor

  1. CMD+I open Composer
  2. Describe the refactor
  3. Review the plan
  4. CMD+Enter to accept all (if you're confident)
  5. Or navigate changes with Tab and accept individually
tip

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

ShortcutmacOSWindows/LinuxDescription
Inline EditCMD+KCtrl+KAI edit at cursor/selection
Chat PanelCMD+LCtrl+LToggle AI chat
ComposerCMD+ICtrl+IMulti-file AI editing
Accept SuggestionCMD+EnterCtrl+EnterAccept ghost text
Accept WordCtrl+RightCtrl+RightAccept one word of suggestion
Next SuggestionAlt+]Alt+]Cycle forward through suggestions
Previous SuggestionAlt+[Alt+[Cycle backward through suggestions
Cancel / DismissEscapeEscapeClose panel or dismiss suggestion
Quick OpenCMD+PCtrl+POpen file by name
Global SearchCMD+Shift+FCtrl+Shift+FSearch across files
Command PaletteCMD+Shift+PCtrl+Shift+PRun any command
Keyboard ShortcutsCMD+K CMD+SCtrl+K Ctrl+SEdit keybindings

Cursor keyboard shortcuts overview

Print this out or keep it visible until the shortcuts become muscle memory.

Summary

  • CMD+K for inline edits - your most-used shortcut
  • CMD+L for chat - ask questions, get explanations
  • CMD+I for Composer - multi-file changes
  • CMD+Enter to 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.