Skip to content

fix(panels): copy and paste in the terminal with ctrl+shift+c/v - #673

Merged
kthare10 merged 1 commit into
developfrom
fix/terminal-copy
Nov 11, 2026
Merged

kthare10 merged 1 commit into
developfrom
fix/terminal-copy

Conversation

@kthare10

Copy link
Copy Markdown
Contributor

Closes #672

What changed (studio-web/components/terminal/terminal-view.tsx)

  • Ctrl+Shift+C copies the terminal selection. It calls preventDefault, so Chrome no longer opens DevTools' inspector, and ^C no longer reaches the shell. It uses navigator.clipboard and falls back to execCommand("copy") outside a secure context.
  • Ctrl+Shift+V goes to the browser's native paste, which xterm's textarea already handles, so there's no clipboard-read permission prompt. Before this, xterm sent ^V to the shell.
  • macOptionClickForcesSelection: true: on macOS, Option+drag now selects text inside TUIs that track the mouse (OpenCode, Claude Code, vim). Shift+drag already did this on Linux and Windows.
  • Ctrl+C is still SIGINT. Cmd+C and Cmd+V on macOS are unchanged; they already worked.

Gates

  • tsc --noEmit ✅
  • npm test ✅ (104 passed)

Untested

I haven't tried this in a browser. To check it on :develop:

  1. In a bash tab, select some text, press Ctrl+Shift+C (Cmd+C on a Mac), and paste it somewhere outside the terminal.
  2. Press Ctrl+Shift+V in the terminal and check that the text is pasted.
  3. In an OpenCode tool tab, check that Option+drag (Mac) or Shift+drag (Linux/Windows) selects text.

Ctrl+Shift+C copies the selection and Ctrl+Shift+V pastes; macOS
Option+drag now selects inside mouse-tracking TUIs.

Closes #672
@kthare10
kthare10 merged commit 14f913c into develop Nov 11, 2026
2 checks passed
@kthare10
kthare10 deleted the fix/terminal-copy branch November 11, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant