Copy/Paste implementation
I've been using Linux for quite some time now, and I think I understand the working of "copy and paste" in various settings, but I'm curious what exactly controls this. In other words, I assume the Vi and Emacs versions are self-contained within those editors, but what about selecting and pasting text in other X windows in general? in a terminal outside of X?
|
Copy & paste in X is controlled by a) either X itself or
b) the WM/DE you're using. Most commonly you will be able to highlight text with mb1-down/highlight/mb1-up and paste it with mb2-click. In the console you can use a similar method if gpm is running and configured. If these aren't the answers you're after I have completely misunderstood your question ;} Cheers, Tink |
That's exactly it, thanks! So in Fluxbox, for example, is it X that's actually keeping track of that mouse-down, mouse-up pattern? Do different WM/DEs handle it any differently?
|
Yes, it's X. DEs/WMs COULD override it, however I have no
idea which ones are using which mechanism. Cheers, Tink |
Interesting, thanks again.
|
x has 3 clipboard type things and their interaction can be kind of strange
first highlight middle click thing is "primary selection" second is called "clipboard selection" and exists within apps and is not overridden by primary selection so for instance you highlight something (text1) in a qtextedit widget as soon as you highlight it is becomes "primary selection" you can paste it around with the middle click button but the "paste" command in the menu does not paste it unless it is selected in a "copy" (text2) from the menu and things selected and copied from the menu "clipboard selection" will continus to be pasted with the "paste" menu command even though the "primary selection" or whats being pasted from the middle click button changes by selecting something else. The third "Secondary selection" another layer clipboard is also available in X but rarely used |
All times are GMT -5. The time now is 06:25 PM. |