Cycle through earlier deleted text in Claude Code
In Claude Code, press Option+Y (Mac), Alt+Y (Windows, Linux). Works when: right after Ctrl+Y.
EscF1F2F3F4F5F6F7F8F9F10F11F12PrtScScrLkPause
`1234567890-=deleteInsHomePgUp
TabQWERTYUIOP[]\DelEndPgDn
CapsASDFGHJKL;'return
ShiftZXCVBNM,./Shift↑
fnctrloptcmdcmdopt←↓→
EscF1F2F3F4F5F6F7F8F9F10F11F12PrtScScrLkPause
`1234567890-=BkspInsHomePgUp
TabQWERTYUIOP[]\DelEndPgDn
CapsASDFGHJKL;'Enter
ShiftZXCVBNM,./Shift↑
CtrlWinAltAltWinMenuCtrl←↓→
EscF1F2F3F4F5F6F7F8F9F10F11F12PrtScScrLkPause
`1234567890-=BkspInsHomePgUp
TabQWERTYUIOP[]\DelEndPgDn
CapsASDFGHJKL;'Enter
ShiftZXCVBNM,./Shift↑
CtrlSuperAltAltSuperMenuCtrl←↓→
See it happen Press the shortcut above, or
More Claude Code shortcuts: editing the prompt
| Action | Mac | Windows | Linux |
|---|---|---|---|
| Go to the start of the line | CtrlA | CtrlA | CtrlA |
| Go to the end of the line | CtrlE | CtrlE | CtrlE |
| Back one word | OptionB | AltB | AltB |
| Forward one word | OptionF | AltF | AltF |
| Delete to the end of the line | CtrlK | CtrlK | CtrlK |
| Delete to the start of the line | CtrlU | CtrlU | CtrlU |
| Delete the previous word | CtrlW | CtrlW | CtrlW |
| Paste the text you deleted | CtrlY | CtrlY | CtrlY |
| Suspend Claude Code to the shell | CtrlZ | — | CtrlZ |