Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not select texts with EnableMouse(true) #1027

Open
rush1kesh-010 opened this issue Sep 25, 2024 · 2 comments
Open

Can not select texts with EnableMouse(true) #1027

rush1kesh-010 opened this issue Sep 25, 2024 · 2 comments

Comments

@rush1kesh-010
Copy link

When we have Application.EnableMouse(true) , we can not select any text with mouse drag in the terminal.

Is it possible to use mouse events while allowing selection of texts with mouse drag?

Here's what I mean by selecting text using mouse drag:
image

@rivo
Copy link
Owner

rivo commented Sep 25, 2024

It works for me in iTerm2 on macOS. Could it be that you need to enable it in your terminal software?

If your terminal software doesn't support selections while forwarding mouse events to the app running inside, there is not much tview can do about it. For example, TextArea and InputField do support text selections but it all happens inside the app. If you want to copy+paste this "emulated" selection like you're used to in non-mouse mode, it's not going to work because your terminal won't have any information about that selection. Unless, of course, your app has access to your local clipboard (which is possible but not very common because it's highly OS-dependent). I don't think this is something you intend to implement.

By the way, if your terminal supports it, you can add hyperlinks to the text, see here. Your screenshot seemed like you might want to make those URLs clickable.

@rush1kesh-010
Copy link
Author

Yes, holding shift bypasses the mouse event forwarding in GNOME terminal in ubuntu, and I can select text using this method.

But for Windows cmd and powershell, there is no bypassing supported for mouse event forwarding. I need to open the Window Control Menu and click Edit->Mark to enter text selection mode in Windows terminals.

Is it possible to make the gnome terminal by default select text like MacOS?

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

No branches or pull requests

2 participants