What’s Covered in This Claude Code Cheat Sheet

This guide includes terminal control keys, text-editing keys, history search, session actions, and frequently used slash commands. Some bindings can vary by terminal emulator, shell profile, or app settings, so verify the keys in your own setup.

Session & Process Control

Interrupt current response / command
CtrlC
Exit session (EOF)
CtrlD
Clear screen
CtrlL
Suspend process (shell dependent)
CtrlZ
Open help commands
/help

Prompt Editing Basics

Move cursor to start of line
CtrlA
Move cursor to end of line
CtrlE
Delete character before cursor
Backspace
Delete character under cursor
CtrlD
Delete from cursor to line start
CtrlU
Delete from cursor to line end
CtrlK
Delete previous word
CtrlW
Transpose characters
CtrlT
Undo last prompt edit
Ctrl_
Insert new line without submit
ShiftEnter
Submit prompt
Enter

Word Navigation

Move back one word
AltB
Move forward one word
AltF
Delete next word
AltD
Delete previous word (alternate)
EscBackspace

History & Search

Previous command/history item
CtrlP
Next command/history item
CtrlN
Reverse search in history
CtrlR
Forward search in history
CtrlS
Accept autosuggestion
β†’
Auto-complete command/path
Tab

Selection, Clipboard, and Terminal UI

Copy selected text
CtrlShiftC
Paste into terminal
CtrlShiftV
Select all terminal text
CtrlShiftA
Open new terminal tab
CtrlShiftT
Close terminal tab
CtrlShiftW
Search terminal output
CtrlShiftF

Claude Code Slash Commands

Show command list / help
/help
Clear current conversation context
/clear
Switch model
/model
Compact conversation/context
/compact
Show usage / cost info
/cost
Session status
/status
Open config or settings
/config
Resume previous session
/resume
Initialize project context
/init
Exit Claude Code
/exit

Session & Process Control

Interrupt current response / command
CtrlC
Exit session (EOF)
CtrlD
Clear screen
CtrlL
Suspend process
CtrlZ
Open help commands
/help

Prompt Editing Basics

Move cursor to start of line
CtrlA
Move cursor to end of line
CtrlE
Delete from cursor to line start
CtrlU
Delete from cursor to line end
CtrlK
Delete previous word
CtrlW
Delete next character
CtrlD
Transpose characters
CtrlT
Insert new line without submit
ShiftReturn
Submit prompt
Return

Word Navigation

Move back one word
OptionB
Move forward one word
OptionF
Delete next word
OptionD
Delete previous word (alternate)
EscDelete

History & Search

Previous command/history item
CtrlP
Next command/history item
CtrlN
Reverse search in history
CtrlR
Forward search in history
CtrlS
Accept autosuggestion
β†’
Auto-complete command/path
Tab

Terminal UI (Common Defaults)

Copy selected text
CmdC
Paste into terminal
CmdV
Open new tab
CmdT
Close current tab
CmdW
Find in terminal output
CmdF

Claude Code Slash Commands

Show command list / help
/help
Clear current conversation context
/clear
Switch model
/model
Compact conversation/context
/compact
Show usage / cost info
/cost
Session status
/status
Open config or settings
/config
Resume previous session
/resume
Initialize project context
/init
Exit Claude Code
/exit

Also see: Cursor β€’ VS Code β€’ IntelliJ