gcla / gowid

Compositional widgets for terminal user interfaces, written in Go, inspired by urwid.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can text from edit widget be selectable for copy/past action?

mdouchement opened this issue · comments

I'm building a TUI application that use the edit widget like your examples/gowid-editor/editor.go example.

I wanted to have the possibility of selecting some piece of text for copying it but I don't figure out how do do that.

Hi - I think that a number of terminals support normal copying and pasting when the user holds down the shift key. So even if the terminal application is intercepting mouse clicks, you can bypass that by holding shift and then clicking. That said, I've noticed trouble pasting longish strings into the edit widget in gowid - I'm not sure why yet, so I'll open an issue. Let me know if you run into that...

Ok I found the text selection in iTerm2 by using the alt modifier.

Yep I also run in trouble when pasting long lines or multilines.

Thanks for the feedback. I'll close this issue, and track the pasting issue in #14.