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
add copy and paste shortcuts to multiline mode #201
Conversation
main.go
Outdated
clip, err := clipboard.ReadAll() | ||
msg.Runes = []rune(clip) | ||
if err != nil { | ||
panic("could not write to clipboard") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could not read from clipboard*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check if pasting works on your machine now? golang-design/clipboard
says it only depends on X11, the previous library depended on xclip.
Definitely can be very useful, appreciate it |
Also I noticed that the repo hasn't been updated in a long time, there is another package with more recent updates - https://github.com/golang-design/clipboard |
Undo the last commit, do a force push and I will merge it |
Okay, I think I did that but have trouble figuring out git sometimes. Did you mean to merge into one commit, or to remove the change to |
Yes go back to using |
Here is the content of your old main.go file, I made small changes related to error messages |
changed clipboard library added copy and paste shortcuts to multiline mode changed clipboard library reverted removed deps removed old code
Alright, I think this is correct now. Thanks for linking that file.
|
I changed shortcut from |
Added copy and paste keybindings to multiline mode.
These keybindings are only proccessed while the textarea is unfocused.
It uses this library https://github.com/atotto/clipboard.
Using the shortcuts to copy and paste between tgpt windows:
tgptcopyfast.mp4