claude-code-toolkit

Keyboard Shortcut

Ctrl+C — cancel input or exit

Clears whatever you've typed if the input line isn't empty; pressed again quickly on an empty line, it exits Claude Code.

Ctrl+C is context-sensitive: with text in the input box, it clears that text first rather than immediately quitting, which avoids accidentally exiting when you meant to clear a half-typed message.

On an empty input line, it behaves like the shell convention it borrows from — pressing it exits the session.

This is different from Esc, which interrupts Claude mid-response rather than touching your input or exiting anything — see the Esc entry for that distinction.

Press Ctrl+C to clear input, or on an empty line to exit

Frequently asked questions

What does Ctrl+C — cancel input or exit do in Claude Code?

Clears whatever you've typed if the input line isn't empty; pressed again quickly on an empty line, it exits Claude Code.

How do I use it?

Try: Press Ctrl+C to clear input, or on an empty line to exit

Any caveats to know about?

This is different from Esc, which interrupts Claude mid-response rather than touching your input or exiting anything — see the Esc entry for that distinction.

Is this covered in the Claude Code Toolkit?

Yes — Ctrl+C — cancel input or exit and patterns like it are part of the full command, hook, and template pack included with a Claude Code Toolkit subscription.

Want the full command, hook, and template pack?

This is one pattern out of the full Claude Code Toolkit — subscribe for the complete set, plus everything we add going forward.

Subscribe to the toolkit — $79/mo

← See everything in Explore