7 ms·
Why bother implementing ctrl+c and ctrl+v in Linux when highlighting text copies it, and middle click pastes it? Ctrl+c feels like the dark ages in comparison.
by xedrac 5y ago
Why bother implementing ctrl+c and ctrl+v in Linux when highlighting text copies it, and middle click pastes it? Ctrl+c feels like the dark ages in comparison.
- mindwok 5y agoThe biggest pain with this is when you want to highlight some other text to paste over. For example I use the keyboard method for copying urls and pasting into my address bar, otherwise when you select all on the address bar you copy that instead.
- db48x 5y agoAt least in Firefox you don’t need to clear out the urlbar before pasting into it; what you paste replaces whatever is there. Dunno about Chrome.
- zamadatix 5y agoI usually use middle paste on a desktop mouse but keyboard paste on a touchpad device. As for copying on highlight it depends how you manage your windows, if you use a traditional floating WM and typically click windows to select them you end up with a lot of single character copies messing with your clipboard. Doubly so in the touchpad case again. Or if you like to highlight to bulk delete/replace or if you like to highlight to simply highlight the section on your terminal as you read a manpage or whatever in another window or probably more use cases that didn't immediately come to mind. Point being it's more about use case matching than one option being the dark ages and another being The One Right Way™. Layer on that some like using clipboard history and others just want a single parking space and it gets even more blurry.
- tigerInATurvy 5y agoI'm one of those people who highlights lines as I read them to help me keep focus. Plus, I'd rather have explicit copying via a specific action than something that just happens automatically on highlight.
- commoner 5y agoMiddle-click paste is a non-starter for anyone who uses a pointing stick (TrackPoint), since the middle mouse button is held down to scroll with the stick. Pointing stick users will usually try to disable the selection clipboard to avoid having unwanted text pop up in unexpected places. Regardless, from my experience, the terminal is the only place where Ctrl+C and Ctrl+V are not the standard shortcuts to copy and paste on Linux. These shortcuts seem to be universal everywhere else.
- jimktrains2 5y agoI do it every day and never have issues with scrolling vs pasting. The biggest issue is that some apps don't play nice with the x clipboard.
- commoner 5y agoWhen I hold down the middle mouse button to scroll, change my mind, and then release the middle mouse button to move the cursor elsewhere, that results in an unwanted paste. That has happened enough times, especially in code editors, for the selection clipboard to be an annoyance for me whenever I am using a keyboard equipped with a pointing stick. Some desktop environments and Linux apps have the option to turn off middle-click paste, though this preference is not always honored. I respect the preference of those who do like the selection keyboard, and I don't even have a problem with it being the default. But, I don't think it should be forced on all users, and I don't think decisions about other core desktop functions (like Ctrl+C and Ctrl+V) should be made under the assumption that the selection clipboard is enabled.
- jimktrains2 5y ago> That has happened enough times, especially in code editors Ah, that's probably the difference. I don't usually scroll through a text editor (as I'm usually using vim). I can definitely see how it'd be an issue in a graphical text editor.
- drdec 5y agoNote that the select and middle click method is technically the same as drag and drop. It also doesn't use the same copy-paste buffer as copy and paste. Not to mention many Linux users hate having to use the mouse.
- _dain_ 5y agoBecause maybe I don't want to clobber my clipboard with every damned thing I highlight?
- db48x 5y agoOn Linux there is a separate “clipboard” that gets “clobbered” every time you highlight something. See my other comment on the matter or https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#peer_to_peer_communication_by_means_of_selections https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM....
- _dain_ 5y agoI know; I just pretend that clipboard doesn't exist. I've never found it convenient for anything other than pasting to terminals that screw up the CTRL-C/CTRL-V shortcuts.
- db48x 5y agoHmm. I am genuinely curious, how is it less convenient for you? To copy something to the clipboard you have to select it and press control–c, then to paste it you have to click where you want it to go and press control–v. That’s not very hard, certainly. But to use selection instead you only have to select it, then hover over where you want it and middle click. That’s fewer steps! Of course I am assuming that your hand is already on the mouse. However, you said that you highlight things frequently as you read them, so I assume that’s what you meant.
- _dain_ 5y agobecause as I said, if I already have something on the clipboard, I don't want it to be overwritten by everything I highlight. a non-copying reason to highlight is the "search for" feature in a browser, I use that all the time. a very common thing is to highlight some text, then highlight some other text in an input field or text editing program, then paste to replace the highlighted text with the copied text. if all I had was the middleclick buffer, this wouldn't be possible.
- petepete 5y agoIf you use Miro in Firefox on Linux, middle click dragging moves you around the board and pastes your clipboard contents in as a post-it.
- somenewaccount1 5y agoSince when did highlighting text copy it? That would be a true nightmare for me as I use highlighting to focus when I read, extensively.
- db48x 5y agoOn Linux, it has basically always worked that way. However, there are essentially two¹ different clipboards. Of course some applications could do things differently, but usually they will use what you think of as the clipboard for keyboard shortcuts like control–c and control–v, while selecting things with the mouse uses a separate system². There are some interesting differences between them as well. When using the clipboard your application sends whatever you copied to the clipboard and pasting copies it out of the clipboard. With selection, however, the application merely announces that the user has selected something in that application. When you middle–click to paste, the application you pasted into must send a message to whichever application was most recently used to select something (relayed via the X server), and the reply contains the selected data. https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM/icccm.html#peer_to_peer_communication_by_means_of_selections https://www.x.org/releases/X11R7.6/doc/xorg-docs/specs/ICCCM... ¹ Actually, there are three³. CLIPBOARD for control–c/v, PRIMARY for selecting with the mouse, and SECONDARY for selecting with the mouse while holding down alt. ² But of course these two systems are implemented using the same messages to and from the X server. They simply have different conventions for how they are used. ³ Actually, there are as many as you care to implement. These three are simply conventional; applications are free to use other names to identify other communication channels. ⁴ … Profit!