Skip to content

TUI: auto-copy highlighted text on mouse selection #85

Description

@yxlyx

Summary

Add an option for the TUI to automatically copy highlighted/selected text to the system clipboard when the user finishes a mouse drag selection.

Problem

Currently users have to select text in the TUI and then press Ctrl+C to copy it. This adds friction for a common workflow: quickly highlighting output, letting go of the mouse, and pasting it elsewhere.

Proposed behavior

  • When a user drags to highlight text in the TUI, copy the selected text to the clipboard automatically when the mouse button is released.
  • After copying, show a small non-blocking confirmation popup/toast at the bottom of the TUI saying: Copied to clipboard.
  • The popup should disappear automatically after a short delay.

UX notes

  • This should not interrupt keyboard input or require dismissal.
  • Consider making the behavior configurable if automatic copy could surprise users.
  • If clipboard access fails, show a brief error toast instead of silently failing.

Acceptance criteria

  • Drag-selecting text in the TUI copies the selected text to the system clipboard on mouse release.
  • A bottom toast/popup appears with Copied to clipboard after successful copy.
  • The toast auto-dismisses after a short delay.
  • Existing Ctrl+C copy behavior continues to work.
  • Empty selections do not trigger clipboard writes or a toast.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions