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.