fix(terminal): use ctrl shift c for output copy

Capture Ctrl+Shift+C before xterm input handling and copy selected output through a browser-compatible fallback. Preserve Ctrl+C as terminal input.
This commit is contained in:
2026-07-22 13:01:31 +02:00
parent 29e765b2be
commit bcc7486b59
3 changed files with 38 additions and 25 deletions
@@ -6,7 +6,8 @@ Users cannot reliably copy terminal output from the browser terminal. Browser co
## Required behavior
- Copying a selected terminal region with standard browser shortcuts (`Ctrl/Cmd+C`) copies text to the system clipboard without sending an interrupt to the terminal.
- Copying a selected terminal region with `Ctrl+Shift+C` copies text to the system clipboard without sending input to the terminal.
- `Ctrl+C` remains a terminal interrupt, including when output is selected.
- Copy requests expose the xterm selection as plain text.
- Pasting plain text is handled once and follows bracketed-paste mode when enabled.
- Normal terminal interrupts still work when there is no active selection.