-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Selected text and copied text should go to separate clipboards — standard X11 clipboard behavior #162
Comments
Thanks for the link, this is all news to me as a casual X11 user. I'll have to dig into the SDL source code to see what exactly SDL_SetClipboardText() does in practice, and if there is any way to influence the behavior. Of course, there is always the option of using X11 APIs directly for this, but I would prefer a more cross-platform solution... There is an existing command line tool: https://github.com/astrand/xclip/ That is a good resource to see how the APIs work (appears quite complex!), but one option is to simply run |
To call xclip behind the scenes is fine with me, but I think xlib is the way to go if not SDL have a way to do it. |
I'll have to take a much closer look at the Xlib APIs. If it turns out to be not too complicated, it is indeed better to not call external tools just for accessing the clipboard. |
Interesting new feature in SDL 2.26:
|
When selecting text, you should be able to paste it into terminal (or other applications) with middle mouse click.
PRIMARY clipboard
should be used for this.Also when selecting text and choosing copy, when pasted into vim (terminal), vim hangs for a while, and pastes something old instead.
CLIPBOARD clipboard
should be used for thisTested with
vim -u DEFAULTS -U NONE -i NONE
https://specifications.freedesktop.org/clipboards-spec/clipboards-latest.txt
The text was updated successfully, but these errors were encountered: