claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Feat: Ctrl-Y (yank)

Open kmcclosk opened this issue 6 months ago • 2 comments

Ctrl-K ("kill") still kills text from the cursor to the end of the line, however it looks like Ctrl-Y ("yank") which pastes back the kill text has been removed in the latest release (Version 1.0.18). I'm quite sure this worked previously. I believe from a previous issue that Claude Code is using GNU Readline which supports these keychords (as well as emacs).

kmcclosk avatar Jun 10 '25 19:06 kmcclosk

We've never had support for Ctrl - Y / yank / buffers, so this doesn't seem to be a regression

sid374 avatar Jun 11 '25 10:06 sid374

there should be Ctrl+_ for undo though

jackielii avatar Jun 21 '25 05:06 jackielii

the killed text is not recoverable. It doesn't go to: * The system clipboard (can't paste with cmd-v/ctrl-v) * An Emacs-style kill ring (can't yank with ctrl-y)

This makes ctrl-k a destructive operation with no undo/recovery mechanism.

Suggested Fix

Either:

  • Implement a kill ring and ctrl-y for yank (full Emacs compatibility)
  • Make ctrl-k copy to system clipboard (partial compatibility, full recoverability)
  • Remove ctrl-k until a recovery mechanism is implemented

debonet avatar Oct 16 '25 17:10 debonet