Skip to content

Feature Request: mouse text selection that copies logical text, not the rendered layout (Claude Code's option+click native select) #26

Description

@brendandebeasi

Summary

There is no way to select text on screen and get the underlying logical text back. Dragging over a response gives me what is rendered: hard wraps at the current pane width, plus any box borders that fall inside the range. Pasting that into an editor, a commit message or a chat means repairing every wrap by hand.

Claude Code solves this in the terminal itself, and it is the thing I miss most when I switch to droid.

What Claude Code does

It enables mouse reporting (\x1b[?1000h + \x1b[?1006h), implements click-to-select over its own rendering with copy-on-select, and binds ctrl+c to copy the selection. Because that capture would otherwise block the terminal's own selection, it also prints a hint telling you how to escape it:

  • macOS: option+click to native select
  • elsewhere: shift+click to native select
  • in the VS Code terminal, where Option is already claimed: set macOptionClickForcesSelection in VS Code settings

The result is that Option-drag gives me the raw buffer when I want it, and a plain drag gives me droid's idea of the text when I want that instead. Either way I get something pasteable.

What droid has today

/copy opens a selector for prompts, responses, turn ranges, or the session ID, and OSC 52 carries it up to the terminal. That works, and it is the right thing for "copy that whole response".

It is the wrong shape for the common case, which is wanting the three lines currently on screen: a path, a command, one paragraph of an answer. Running a slash command and picking a unit is a modal detour for something the mouse is already pointing at, and no unit in that selector is "the part I highlighted".

Request

In preference order:

  1. Mouse selection over droid's own rendering, where the copied text maps back to the source rather than the layout: soft wraps rejoined, box borders and gutters stripped, code blocks copied as the code. Copy on select, with ctrl+c or similar to copy explicitly.
  2. The escape hatch and the hint that goes with it, matching Claude Code: option+click on macOS and shift+click elsewhere for a native terminal selection, and a visible line saying so, because a TUI that captures the mouse with no hint is the version of this that annoys people most.
  3. If neither, a smaller version: a selection or visible region unit in /copy, or a key that copies just the message under the cursor, so there is at least one path to clean text that does not involve picking a whole turn.

Environment

  • droid 0.204.0 (Homebrew cask, macOS arm64)
  • Claude Code 2.1.251 for the comparison above
  • Ghostty 1.3.1, tmux 3.6b

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions