Skip to content

[QOL FEATURE] chat:copy* keybinding actions for response copying #30404

Description

@riptscripts

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

/copy exists and works great, but there's no corresponding keybinding action to map it to a shortcut in keybindings.json. Typing /copy and interacting with the picker each time breaks flow during rapid iteration — especially when you're copying Claude's output into other files or terminals dozens of times per session.

Proposed Solution

A family of copy-related keybinding actions in the Chat context:

  • chat:copyResponse — Copies the full last assistant response (equivalent to /copy with "Always copy full response" enabled)
  • chat:copyCodeBlock — Opens the interactive code block picker (current /copy behavior)
  • chat:copyLastCodeBlock — Copies the most recent code block directly. No picker, no interaction. This is the 90% case.
  • chat:copyTurn — Opens a turn selector to copy from any assistant message in the conversation, not just the last one. Useful in long sessions where the good output was several turns back.

Example keybindings.json:

{
"context": "Chat",
"bindings": {
"ctrl+shift+c": "chat:copyResponse",
"ctrl+shift+x": "chat:copyLastCodeBlock",
"ctrl+shift+a": "chat:copyTurn"
}
}

Alternative Solutions

  • Using Zed's integrated terminal select + copy (Cmd+C), but this requires manual mouse selection and doesn't understand code block boundaries, you end up grabbing line numbers, prompt artifacts, or partial blocks.
  • External clipboard managers (Raycast, Alfred) can capture everything you copy sure, but has no awareness of Claude Code context. No tagging, no fuzzy search scoped to prompts, no $1/$2 interpolation, no project-level sharing via git. Also doesn't integrate with Zed's terminal workflow.
  • Manually maintaining a prompts.md file and copy-pasting in/out TECHNICALLY WORKS but it's entirely manual and has no integration with the Claude Code workflow, and no keybind to make it seamless.
  • Shell history (up arrow) only works within the same session, doesn't persist, and mixes prompts with every other command.

Priority

High - Significant impact on productivity

Feature Category

Interactive mode (TUI)

Use Case Example

You're iterating on a module. Claude outputs a corrected function. You want to paste it into your editor. Right now: type /copy, interact with picker, select the block, paste. With chat:copyLastCodeBlock bound to ctrl+shift+x: one keystroke, it's on your clipboard.

For chat:copyTurn? You're 12 turns deep, and the best version of a component was 5 turns ago. Currently you scroll, manually select, copy. With chat:copyTurn you get a turn picker and grab it instantly BOOM BAM BOP 100x PRODUCTIVITY GAINED.

Additional Context

Also proposing a copyFormat setting in settings.json — "raw" or "markdown". When pasting into terminals, Slack, or non-markdown contexts, you don't want backticks, headers, and bold markers coming along. Raw mode strips all markdown formatting before copying to clipboard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions