Inline Edit (Ctrl+K) in AI

From the Cursor cheat sheet ยท Essential Shortcuts ยท verified Nov 2026

Inline Edit (Ctrl+K)

Cmd/Ctrl+K no longer opens an inline edit box: it sends your selection to Agent

bash
# Inline edit was replaced by Agent
Cmd/Ctrl+K         # Same as Cmd/Ctrl+L: open Agent with the selection referenced

# In the Agent input
Enter              # Send the request
Cmd/Ctrl+Shift+Backspace  # Cancel generation

# Review the edits Agent applied
Cmd/Ctrl+Enter     # Accept all changes
Cmd/Ctrl+Shift+Backspace  # Reject all changes

# Agents Window only
Cmd/Ctrl+K         # Command palette: search across conversations
bash
# Example: refactor a function
1. Select the function
2. Press Cmd/Ctrl+K
3. Type: "Convert to async/await"
4. Press Enter
5. Watch the edit appear in the diff view
6. Accept it, or reject what you do not want
๐Ÿ’ก In the editor, Cmd/Ctrl+K and Cmd/Ctrl+L now do the same thing
โšก Agent applies edits as it works; review them in the diff view
๐Ÿ” Restore Checkpoint on an earlier message rolls the files back
๐Ÿ“Œ In the Agents Window, Cmd/Ctrl+K opens the command palette instead
inlineeditrefactor

Continue with Cursor

Save the full cheat sheet or work through every related task.

More AI tasks

Back to the full Cursor cheat sheet