Keyboard Shortcuts
Module: Navigation & Shortcuts | Lesson: 1 of 4 | Time: ~10 minutes
What You Will Learn
- Essential shortcuts: Escape, Ctrl+C, Ctrl+D
- How to navigate input history
- How to enter multi-line input
- All available keybindings
Prerequisites
- Completed Module 03: Configuration
Why Keyboard Shortcuts Matter
When you first started using Claude Code, you probably typed a message and pressed Enter. That works fine, but as you use Claude Code more, you will find yourself wanting to do things faster — cancel a response, scroll through your previous prompts, or type a message that spans multiple lines.
Keyboard shortcuts let you do all of this without taking your hands off the keyboard. Think of them like the difference between clicking through menus in a program versus using Ctrl+C to copy — same result, but much faster once you build the habit.
The Most Important Shortcuts
Enter — Send Your Message
You already know this one. Type your prompt and press Enter to send it to Claude.
You: What files are in this project?
[press Enter]
Claude immediately begins processing your request.
Shift+Enter — New Line (Multi-Line Input)
What if you want to type a long, detailed prompt that spans several lines? If you press Enter, it sends the message. Instead, press Shift+Enter to add a new line without sending.
You: I need you to do three things:
[press Shift+Enter]
1. Create a new file called index.html
[press Shift+Enter]
2. Add a basic HTML template
[press Shift+Enter]
3. Include a heading that says "Hello World"
[press Enter to send]
Multi-line prompts are great when you have a list of tasks, want to include code snippets in your prompt, or need to give Claude detailed step-by-step instructions. The clearer your prompt, the better Claude's response.
Escape — Dismiss or Cancel
The Escape key is your "nevermind" button. It serves several purposes:
- Dismiss autocomplete suggestions — If Claude Code is suggesting a completion and you do not want it, press Escape.
- Exit the current input — If you have typed something but decide not to send it, press Escape to clear the input area.
- Cancel a tool use — If Claude is about to run a command and asks for permission, press Escape to deny it.
Ctrl+C — Stop Claude Mid-Response
Sometimes Claude starts responding and you realize you asked the wrong question, or the response is going in the wrong direction. Press Ctrl+C to interrupt Claude immediately.
You: List every file in my entire computer
[Claude starts generating a massive response]
[press Ctrl+C]
You: Actually, just list the files in this project folder
On Windows, Ctrl+C is normally used to copy text. Inside Claude Code (which runs in the terminal), Ctrl+C instead sends an interrupt signal. This is standard terminal behavior. To copy text from the terminal, use your terminal's copy shortcut (often Ctrl+Shift+C or right-click).
Navigation Shortcuts
Up Arrow and Down Arrow — Prompt History
Just like the Windows Command Prompt remembers your previous commands, Claude Code remembers your previous prompts. Press the Up Arrow to cycle back through messages you have sent, and Down Arrow to cycle forward.
This is extremely useful when you want to:
- Re-send a prompt you sent earlier
- Modify a previous prompt slightly and send it again
- Remember what you asked a few messages ago
[press Up Arrow] → Shows your last prompt
[press Up Arrow] → Shows the one before that
[press Down Arrow] → Goes back to the more recent one
Tab — Autocomplete
When Claude Code shows you suggestions (such as file names or command completions), press Tab to accept the suggestion. This saves typing and reduces typos.
Advanced Shortcuts
Ctrl+O — Open an Editor
If you need to write a very long or complex prompt, the multi-line input with Shift+Enter can feel cramped. Press Ctrl+O to open your prompt in an external text editor (such as Notepad or VS Code, depending on your system configuration). Write your prompt there, save and close the editor, and the text will be sent to Claude Code.
Claude Code uses the editor set in your system's EDITOR environment variable. If you are not sure what that is, do not worry — you can ask Claude Code to help you set it:
You: How do I set my default editor to VS Code on Windows?
Ctrl+R — Fuzzy Search History
If you have sent many prompts and cannot remember the exact one you want, press Ctrl+R to search through your prompt history. Start typing any part of a previous prompt and Claude Code will find matches.
[press Ctrl+R]
[type "html"] → Finds your earlier prompt about creating an HTML file
[press Enter] → Loads that prompt into the input area
This is much faster than pressing the Up Arrow dozens of times.
Customizing Keybindings
If you prefer different key combinations, Claude Code lets you customize its keyboard shortcuts. Your custom keybindings are stored in ~/.claude/keybindings.json.
To see or modify your keybindings, you can ask Claude:
You: Show me how to customize my keybindings in Claude Code
Or you can directly open the file in your text editor:
You: Open ~/.claude/keybindings.json
The file uses a JSON format where each entry maps an action to a key combination:
[
{
"key": "ctrl+s",
"command": "submit",
"description": "Send the current message"
}
]
If you bind a key that your terminal already uses (like Ctrl+C for interrupt), the terminal shortcut usually takes priority. Stick to combinations that do not conflict with your terminal emulator.
Quick Reference Card
Here is every shortcut covered in this lesson, in one place:
| Shortcut | What It Does |
|---|---|
| Enter | Send your message |
| Shift+Enter | New line (multi-line input) |
| Escape | Dismiss / cancel |
| Ctrl+C | Stop Claude mid-response |
| Up Arrow | Previous prompt in history |
| Down Arrow | Next prompt in history |
| Tab | Accept autocomplete suggestion |
| Ctrl+O | Open prompt in external editor |
| Ctrl+R | Fuzzy search through prompt history |
Try It Yourself
Practice each shortcut in a quick hands-on session:
- Open Claude Code in any folder.
- Send a simple prompt by pressing Enter:
What is 2 + 2? - Write a multi-line prompt using Shift+Enter:
Tell me three things:
[Shift+Enter]
1. What day of the week is it?
[Shift+Enter]
2. What is the capital of France?
[Shift+Enter]
3. What is 10 times 10?
[Enter to send] - Press Ctrl+C while Claude is responding to interrupt it.
- Press the Up Arrow twice to scroll back through your prompt history, then press Enter to re-send an older prompt.
- Press Ctrl+R, type part of a previous prompt, and select it.
- Press Escape when you see any autocomplete suggestion to dismiss it.
You do not need to memorize every shortcut right now. Start with Enter, Shift+Enter, Ctrl+C, and the Up Arrow. Add the others as you get comfortable.
What You Learned
- Enter sends your message; Shift+Enter adds a new line without sending.
- Escape dismisses suggestions and cancels actions.
- Ctrl+C stops Claude mid-response — essential when things go off track.
- Up/Down Arrows let you cycle through your prompt history.
- Ctrl+O opens an external editor for long prompts.
- Ctrl+R lets you fuzzy-search your prompt history.
- Tab accepts autocomplete suggestions.
- You can customize all keybindings in
~/.claude/keybindings.json.
How was this lesson? Take 2 minutes to share your feedback — it helps us make the tutorials better for everyone.