Claude Code Prompt Shortcuts
Level 1 · Starting out
The keys and signs that save typing in the Claude Code prompt box. New lines, past prompts, file names, pasted images, shell commands and voice.
Course contentsLesson 4 of 16
Level 1 · Starting out
Level 2 · Asking before it acts
Level 3 · Telling it how you work
Level 4 · The tools it uses
Level 5 · Growing past one chat
After this lesson you can
- Write a prompt over many lines
- Name a file and paste an image
- Run a shell command from the prompt box
9 mincovers 11 glossary entries
Worth reading first: Checkpoints and Control Keys
Which keys make the prompt box faster
Plain Enter sends your prompt. To start a new line instead, press Shift+Enter, which works out of the box in many newer terminals. A backslash then Enter works in every terminal, and so does Ctrl+J. Type ? on an empty prompt to see every key.
The up arrow brings back your past prompts, newest first, so you can send one again or fix a typo in it. Ctrl+R searches them as you type a word. When your prompt runs over more than one line, the up arrow first moves the cursor up inside it.
Long prompts are easier to write in a real editor. Ctrl+G opens your prompt in your own text editor. Save and close it, and the text comes back to the prompt box. Ctrl+S puts a half-written prompt aside so you can ask something else first. Press it again on an empty box to get it back.
Type @ and part of a name to point at a file. A list of matching files opens, and the one you pick goes into the prompt as its path. Claude then knows exactly which file you mean. Ctrl+V pastes an image from your clipboard and leaves a tag like [Image #1] where the cursor is.
A line that starts with ! runs in your shell at once. Its output joins the chat, and Claude replies to it. It is a quick way to show Claude a test run or a git status, without asking Claude to run it first.
A colon starts an emoji code. Type :heart: and it turns into the picture. Holding the space bar starts voice dictation, once voice dictation is switched on. You hold the key and speak, and your words show up in the prompt. Running /voice tap makes a tap start and stop it instead.
Prompt keys and signs
| Press or type | What happens |
|---|---|
| Shift+Enter, \ then Enter, or Ctrl+J | A new line, without sending |
| Up arrow | The last prompt you sent in this folder |
| Ctrl+R | Search your past prompts |
| Ctrl+G | Edit the prompt in your own text editor |
| Ctrl+S | Put the draft aside, then get it back |
| Ctrl+V | Paste an image from the clipboard |
| @ and a name | Pick a file to point at |
| ! at the start | Run the line in your shell |
| ? on an empty prompt | Show every key you can press |
| : and a name | Turn an emoji code into the emoji |
| Hold Space | Speak your prompt, once dictation is on |
! npm testWorked example
Jack shows Claude the failure
Jack's build fails, and he does not want to paste 200 lines of log by hand. He types ! npm run build in the prompt box.
The output lands in the chat. He adds one line pointing at @src/config.ts, and Claude finds the typo on line 14.
The words for this lesson11
Check yourself
Which way to start a new line works in every terminal?
Finished this lesson?
Marking it complete also marks its 11 glossary entries learned, which updates your roadmap and your saved page. 0 are already marked.