Ctrl+D in Claude Code

Exit the session (press twice). With text in the prompt it deletes the next character.

Mac

Ctrl+D

Windows

Ctrl+D

Option-key shortcuts need your terminal to send Option as Meta on macOS. Source: Claude Code interactive mode docs, checked 2026-10-24.

More shortcuts

  • Ctrl+G: Open the prompt in your default text editor.
  • Ctrl+L: Redraw the screen, keeping input and history.
  • Ctrl+O: Toggle the transcript viewer with detailed tool usage.

All keyboard shortcuts

Remember it next time

/cards has a flip-card deck for every Claude Code shortcut.