mirror of
https://github.com/anomalyco/opentui.git
synced 2026-04-25 13:06:00 +03:00
[PR #411] [MERGED] feat(console): add mouse selection and scrolling support, with optional onCopy callback to use clipboard in applications #1299
Labels
No labels
bug
core
documentation
feature
good first issue
help wanted
pull-request
question
react
solid
tmux
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/opentui#1299
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/anomalyco/opentui/pull/411
Author: @edlsh
Created: 12/13/2025
Status: ✅ Merged
Merged: 12/15/2025
Merged by: @kommander
Base:
main← Head:feat/console-copy-selection📝 Commits (10+)
d9b7651feat(console): add copy-to-clipboard supporta79bc0efix(console): add defensive error handling and edge case tests63b4e41keybindings29d7673setup in run fn583b558setup only onceb49c1bdbutton highlighting5ad9f17handle full mouse event01dc236stash579cc9dfix tests and show latest keybind9864997cleanup📊 Changes
6 files changed (+1170 additions, -95 deletions)
View changed files
📝
packages/core/src/console.test.ts(+537 -21)📝
packages/core/src/console.ts(+537 -73)📝
packages/core/src/examples/console-demo.ts(+15 -1)📝
packages/core/src/lib/keymapping.test.ts(+44 -0)📝
packages/core/src/lib/keymapping.ts(+23 -0)📝
packages/core/src/renderer.ts(+14 -0)📄 Description
Add copy-to-clipboard support for TerminalConsole
Adds text selection and copy functionality to the console:
Ctrl+Shift+ConCopySelection?: (text: string) => voidinConsoleOptionsMotivation
Requested in sst/opencode#5239 — rather than having consumers intercept mouse events, this implements the feature properly in opentui.
New options
Usage
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.