[GH-ISSUE #694] When mouse enabled - text is not selectable on app #506

Closed
opened 2026-03-04 01:05:34 +03:00 by kerem · 3 comments
Owner

Originally created by @buzzdan on GitHub (Jan 28, 2022).
Original GitHub issue: https://github.com/rivo/tview/issues/694

I would like to have text selection enabled on my app (any text - from a table, text view, etc...)
the problem is when i enable mouse on the app, text selection turns off.
i couldn't find any way to enable it
am i missing something?

any help would be highly appreciated 🙏

Originally created by @buzzdan on GitHub (Jan 28, 2022). Original GitHub issue: https://github.com/rivo/tview/issues/694 I would like to have text selection enabled on my app (any text - from a table, text view, etc...) the problem is when i enable mouse on the app, text selection turns off. i couldn't find any way to enable it am i missing something? any help would be highly appreciated 🙏
kerem closed this issue 2026-03-04 01:05:35 +03:00
Author
Owner

@rivo commented on GitHub (Feb 16, 2022):

To my knowledge, you can't have both. When mouse handling is enabled, your terminal sends all mouse events to the app instead of processing them itself, e.g. for text selection.

<!-- gh-comment-id:1041328306 --> @rivo commented on GitHub (Feb 16, 2022): To my knowledge, you can't have both. When mouse handling is enabled, your terminal sends all mouse events to the app instead of processing them itself, e.g. for text selection.
Author
Owner

@buzzdan commented on GitHub (Feb 22, 2022):

mmm i see what you are saying, but still i wonder how other TUI apps work?
as a user i'm used to it that mouse selection is enabled

<!-- gh-comment-id:1047782818 --> @buzzdan commented on GitHub (Feb 22, 2022): mmm i see what you are saying, but still i wonder how other TUI apps work? as a user i'm used to it that mouse selection is enabled
Author
Owner

@rivo commented on GitHub (Feb 22, 2022):

I can only guess (also because I haven't seen any TUI apps that enable both; they probably exist but I haven't used any yet) that the selection is built into the app itself. Some kind of drag and drop functionality which highlights selected text and then interacts with the OS's clipboard.

You could try to do that yourself (e.g. using region tags in TextView) but I'm not sure how difficult it would be.

<!-- gh-comment-id:1047851320 --> @rivo commented on GitHub (Feb 22, 2022): I can only guess (also because I haven't seen any TUI apps that enable both; they probably exist but I haven't used any yet) that the selection is built into the app itself. Some kind of drag and drop functionality which highlights selected text and then interacts with the OS's clipboard. You could try to do that yourself (e.g. using region tags in `TextView`) but I'm not sure how difficult it would be.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#506
No description provided.