I so wish the Linux community would get its act together and implement a working usable clipboard. It's the one thing I miss the most whenever I switch from Mac OS to Linux.
On a Mac, you can cut/copy/paste using predictable keystrokes in any application, anywhere. And there is a single clipboard. On Linux, you have to deal with a multitude of behaviors (middle mouse button, Ctrl-C, others, and does it paste where the cursor is or do you have to click the middle mouse button exactly where you want stuff pasted, etc).
And I'm not even talking about multiple media types: all I need is plaintext.
The second dream wish would be for consistent keybindings in all text input boxes, like in Mac OS. Such as make Ctrl-A always go to the beginning of line, Ctrl-E always to the end, and Ctrl-K always kill whatever is in there.
If I had that, I think I could use Linux without getting annoyed every couple of minutes. I would still miss apps like TextExpander, flawless drag&drop, and lots of other things, but I could at least use it without frustration.
Unfortunately, none of this is likely to happen. If you wonder why, it's enough to look at the responses that will surely land here:
It won't happen because Linux users like it the way it is. It is consistent, it's just not the way you want it to be. I love middle click paste. It makes sense that it doesn't follow the text cursor because the mouse is separate and this adds extra flexibility. Ctrl+A should select everything and put the cursor at the end.
Actually, in some apps the cursor disappears and in some the cursor goes to the end, but the behavior of what happens when text is selected is always the same.
X's copy/paste behavior was meant to be used in conjunction with the secondary selection which is seldom used these days as most modern toolkits don't expose support for it.
This already exists in desktop environments. Of course, not all desktop environments have the same features. I know KDE Plasma has this. It can't work with all apps though, for the same reasons that MacOS and Windows can't have a feature like this that works with all apps. That is, unless you want to translate keystrokes into other keystrokes on a per app basis.
A way to insert X11's "clipboard" buffer (i.e text that is currently selected text).
I agree with GP: I find the two separate copy-paste methods very useful and wouldn't want to see them merged. Users who aren't aware of one of the aren't affected, and those who are get an extra buffer to use.
Clicking with the middle mouse button - nowadays, it's typically a clickable scroll-wheel, but it used to be a plain button between left and right mouse buttons back in the day.
After mice had mostly standardized on two buttons but scroll wheels didn't exist yet, it was common to map a simultaneous click of both mouse buttons to simulate a middle click.
Just as a nitpick: communities can (almost) never "get its act together", as they are comprised of people with different preferences who do not want to abandon their preferences for some abstract common good.
On a more substantive note (globally consistent actions from keystrokes). It would be great, but not going to happen because there are established modes where the same keystrokes lead to well known results. And those actions are different depending on the application. Maybe it would be good if this was not the case, but that ship has sailed a long time ago. MacOS is in sync because its BDFL (Apple) forces it to.
Example: Ctrl-Z. In a terminal, it suspends a process. In most GUI editors it performs undo. Shall we force a global standard? I would pay to watch a user get its editor suspended when he presses Ctrl-Z to undo a typo. Did the program crash? Let me start it again ... what does it mean it is already running?? Where are my edits??? I'll just reboot the machine!
So agreed, global synchronizations that would force this to happen are unlikely. Fortunately. My 2c.
> Just as a nitpick: communities can (almost) never "get its act together", as they are comprised of people with different preferences who do not want to abandon their preferences for some abstract common good.
That seems to be a defining characteristic of Linux communities, anyway. Not sure how you can say "all" communities are like that.
> Example: Ctrl-Z. In a terminal, it suspends a process. In most GUI editors it performs undo. Shall we force a global standard?
Haiku uses Alt instead of Ctrl for shortcuts (similar to macOS and the Cmd key), so Alt+Z does undo and Ctrl+Z suspends a process, both in the Terminal. (If you want to use Windows-style keybindings, then it's the reverse, of course.)
There's also complication that there's more than one standard. It's the same reason that emacs doesn't use conventional shortcuts even when it's running in a GUI: it's been using its current conventions since before the invention of the conventions that are now more popular. Similarly, if we just want to go by "preexisting standards" then really it's those newfangled applications that have hijacked ctrl-z to do anything other than suspending a process that are to blame.
> it's those newfangled applications that have hijacked ctrl-z
Yes. Windows botched this by hijacking the Control key, and the desktop-Linux crowd are unable to do anything but imitate Windows. Pre-Linux GUIs didn't have this problem, and MacOS doesn't have this problem.
How hard would it be to adapt a linux distro to have separate keys for control/command (a la MacOS). This is my single biggest blocker against using Linux as my daily driver - not having consistent keybaord shortcuts that avoid collision with terminal interrupts.
I think a KDE-based system could do it with modest effort. There's a flag deep in QT somewhere, enabled on Mac builds, that makes all the ‘Ctrl’ shortcuts default to ‘Command’ instead, and it would go a long way if that were a user-selectable option.
Actually, one thing which drives me to distraction is Emacs making C-Z a shortcut for minimising the window when using the GUI version. It's not a shell!!
It certainly makes sense when running inside a terminal. But when it's an X11 application, it makes me angry everytime I fumble C-X and it interrupts my workflow.
If you pretend that the "middle mouse button" clipboard doesn't exist (it is a feature that many are not even aware of) you then using the the regular one instead is a piece of cake. In Linux, all applications use Ctrl+C and Ctrl+V. The exception is inside the terminal, where you need to use Ctrl+Shift+C and Ctrl+Shift+V (due Ctrl+C already having a meaning there).
I spend somewhere around 30% of the time in a terminal, and the remainder outside of it. I am a former mac user, and after a year and a half the Ctrl+Shift+C thing still drives me mad.
Shortcuts are just better on the OSX side of the fence (not perfect, but way better). IMHO, global actions (copy, paste, select all, cut, undo, redo, etc.) should be mapped to one modifier (say AltGr) and local actions to another (say Ctrl). The most important part of this scheme would be that "global modifier + key" has an unsurprising result that is consistent system-wide. Then "local modifier + something, or modifier1 + modifier2 + something" can do whatever the app wants. This would improve things immensely IMHO...
I don't know about others, but with terminator[0] I'm able to map Ctrl+C to copy - but if nothing is selected, then ^C works as normal. Is that what you're looking for?
In GNOME Terminal you can go to the keyboard shortcut settings and rebind ctrl+C to copy and ctrl+V to paste. If you do so, then you can use Ctrl+Shift+C and Ctrl+Shift+V to do ^C and ^V. Not quite that "selection aware" behavior, but close enough.
From the terminal's point of view, Ctrl+C and Ctrl+Shift+C do the same thing. The only reason you can't usually use Ctrl+Shift+C is that by default that combination is intercepted by gnome-terminal to mean "copy".
(I wouldn't be surprised if other emulators with configurable keyboard shortcuts let you do a similar thing).
If we made Linux more similar to Mac like that then we would alienate everyone else who grew up used to Windows-style Ctrl+C shortcuts (which traces its origins back to the original Xerox PARC GUIs).
(If the terminal's Ctrl+Shift+C really bothers you, many terminal emulators allow you to rebind it to Ctrl+C)
On MacOS the keybindings are configurable via DefaultKeyBindings.dict file. Emacs by default, but I use Vim like key maps. Most important, these settings propagate to all 3rd party apps that use the built-in text UI components. You simply need to restart the app, not the whole system. It’s very powerful.
There are clipboard applications which will pull everything into a single clipboard. KDE Plasma, for instance, has a great built-in clipboard which does this and which also handles at least images as well.
> The second dream wish would be for consistent keybindings in all text input boxes, like in Mac OS. Such as make Ctrl-A always go to the beginning of line, Ctrl-E always to the end, and Ctrl-K always kill whatever is in there.
For this, you should really just run Emacs. But this isn't a Linux issue really, but a more general 'problem' of competing conventions (Emacs, vi, CUA, etc.) for keyboard shortcuts.
The issue is that on a Mac, the conventions work in (almost) any app, in any text entry area, and it's frustrating to not have that work. For example, Excel violates this convention for formula editing, and it's really grating to edit using only left, right and backspace. Probably MS has their own conventions, but I don't use Excel enough to learn them. Command line apps and things like MacVim are obviously a different story.
The controls are actually a little strange, because they aren't well documented or discoverable, and don't seem to be configurable, unlike most other shortcuts.
I do agree that it's frustrating not to have this functionality everywhere. (One minor trick to make some of it a little less painful is that in CUA mode [i.e. MS mode], for Control-A, Control-E, you can type Control-A (=select all) and then Left to jump to the left edge, and Control-A and then Right to jump to the right of a text box).
It's a NEXTSTEP legacy. Any MacOS application that uses the standard UI text field classes (NSText, NSTextView, etc) will get the emacs-like key shortcut behaviors.
The NS prefix on those classes means "NEXTSTEP"
Microsoft Office probably implements its own text box classes so it's different.
> I so wish the Linux community would get its act together and implement a....
The Linux communities are full of volunteers. It seems like their act is actually quite together! There is no 'buyer' to make demands with their dollar. Only there is a developer who one day decides they want a feature.
> I so wish the Linux community would get its act together and
Be the change you want to see in the world. Open source developers are volunteers scratching their own itches, working on their own time. I wish someone would come build me a house for free too, and if they did I'd be hard pressed to complain about the number of windows.
But you might be inclined to complain about the leaking roof, the Escher-esq plumbing, or that the appliances only come in diy-kits with half the parts missing.
The thing about Linux is, there's all these evangelists out there who insist that everyone should use Linux (or that they are superior to you for doing so) and, when you tell them why you don't, insisting your preferences are wrong, your workflow is wrong, it works for them so you're a liar, or you should fix it yourself.
If it weren't for those people, I think the attitude towards Linux would be more like it is towards Haiku. No one really complains about it, they just don't use it.
Oh, don't even get me started on keybindings. There isn't even a good way of setting them up anymore, because there are multiple layers and systems that deal with keyboard events. It used to be that you could get reasonably far with xmodmap, but that is no longer true. And good luck trying to get expansion functionality (e.g. a keystroke that generates several keystrokes).
Also, some context before I get flamed for being a newbie: I've used Linux since before 1.0 (that's 1993). My usual working keyboard setup pretty much requires a Super key and a Hyper is quite helpful, too.
Description:
Autocutsel tracks changes in the server's cutbuffer and CLIPBOARD
selection. When the CLIPBOARD is changed, it updates the cutbuffer.
When the cutbuffer is changed, it owns the CLIPBOARD selection. The
cutbuffer and CLIPBOARD selection are always synchronized.
With this, I can highlight text (which is an implicit "copy") or use CTRL-C and paste with middle-click or CTRL-V (or in emacs, CTRL-Y) and it all works.
The only weirdness is in Google Docs, which seems to hijack CTRL-C, CTRL-V, etc. for its own handling.
I swap left Alt and left Ctrl because my ancient "Mac" muscle memory expects a Control key and Command key in those places. I actually swapped the physical keys on the PC keyboard as well.
alias x='/usr/bin/setxkbmap -option ctrl:swap_lalt_lctl'
That makes most Linux software consistent with Mac Command keys. I still need to use Alt-Tab where I expect Command-Tab (control-tab) to switch to the next Application window because Autokey doesn't seem to be able to override this.
I installed Autokey and have keys assigned for Terminal. So for instance: pressing <alt>+c sends a <ctrl>+c, and pressing <ctrl>+c sends <shift>+<ctrl>+c. I have pretty much all of the alt keys assigned to send control keys, and all of Command keys (control keys) to do what I expect: Close ^w, Copy ^c, Find Next ^g, Find ^f, New ^n, Paste ^v, Select All ^a.
> On a Mac, you can cut/copy/paste using predictable keystrokes in any application, anywhere
Interesting, because Linux is my daily driver, and when I borrow my spouse's MacBook one of the things I get tripped up on is some programs seem to use Ctrl+C/V and other programs use Command+C/V for copying/pasting
All Mac apps use the Command (⌘) key for copy/paste.
I've never encountered an app that uses Ctrl. A developer would really have to go out of their way to accomplish this in their app, since the copy/paste menus are provided by Cocoa; the keyboard shortcuts are essentially built into the OS.
Actually I was misremembering. I was thinking of the Terminal app and having to use Ctrl+A/E to go to beginning/end of line. But jumping words uses Alt+arrow keys. And copy/paste is Cmd+C/V. I find the mixing of the modifier keys really unintuitive as a Mac noob.
But at this point the situation is the same as on linux. I've never encountered anything on linux that didn't use ctrl-c for copy other than terminal apps.
The situation on macOS is that you can copy text from Terminal the same way you copy text from Safari. You can edit text in iTunes the same way you edit text in your shell.
Sure. So each platform has different exceptions, but my point was they both have exceptions. The terminal is an exception on linux, but not on macOS. Other apps are apparently exceptions on MacOS, but those same ones probably aren't exceptions on Linux. The exact apps are different but the overall situation is the same.
Interesting, I don't know a single program on OS X which supports Ctrl+C/V for copy&paste but does not support Command+C/V (indeed, I know only a tiny set of programs that support Ctrl-C/V at all, mostly cross platform software that is badly adapted to OS X).
Out of curiosity, could you name an example or two?
Actually I was misremembering. I was thinking of the Terminal app and having to use Ctrl+A/E to go to beginning/end of line. But jumping words uses Alt+arrow keys. And copy/paste is Cmd+C/V. I find the mixing of the modifier keys really unintuitive as a Mac noob.
One example I’ve found is the trading software for Interactive Brokers. It’s a Java application with mostly custom (and fairly clunky) UI, and it has other Windows-isms like adding an icon to the desktop when you install it.
I've only see this in parallels when using a windows application.
So if you have windows office because it has traditionally been better than the one offered to mac you'd have to remember to use control instead of command.
Just double checked — neither iTerm not Terminal allow the Ctrl modifier for clipboard operations. In fact, terminal applications are _precisely_ the applications I use to argue that Cmd-X/C/V is overall nicer, as they don't interfere with the usual meaning of the Ctrl modifier as a way to produce control characters (which are especially useful in the context of a terminal)
Hm, perhaps you're right, it was some time ago I used a Mac, sorry for the confusion. There was something with Emacs also which was weird on the mac with modifier keys but I don't exactly remember what.
Ctrl would be an artifact of a port from another platform because Ctrl is closer to a Meta key on a Mac (Option is closest to Alt from a PC though). Command is the generally accepted one though. I can’t think of anything that uses Ctrl-based stuff on a Mac besides possibly IntelliJ and that’s only with PC compatibility keybinds enabled.
middle button paste works almost everywhere, apart from when webdevs do clever things.
as for consistent keybindings, I feel you on that. However your example is a bit flawed. home/end keys do what you want, and ctrl left/right does word skipping.
I used to be irritated by middle-click paste as well. That stopped when I had someone explain it to me as follows:
> It’s just another clipboard. One clipboard is interfaced via the keyboard. One clipboard is interfaced via the mouse.
Perhaps that’s common knowledge, but that understanding made me instantly fall in love with middle-click paste.
In most terminal emulators, Ctrl-C deviates from normal behavior in favor of sending SIGINT. However, some terminal emulators (e.g. the one in elementary OS) makes the simple decision that if text is highlighted, copy it. Otherwise, send SIGINT. That closes all loose ends for me.
No it's not. From his standpoint, the clipboard situation is broken. It's reasonable to state his viewpoint. Especially given that he's addressing a large community and not a small set of individuals, it's borderline absurd that someone would take personal offense at his statement.
It's unreasonable to expect that criticisms be phrased politically to avoid stepping on oversensitive toes.
I'm not saying asking for a different clipboard situation is unreasonable, I'm saying the phrasing is rude. Telling someone or someones to get their act together is saying they're incompetent or ineffective. It's needless because most of these someones have no financial interest in winning this poster as a user but the poster phrases it as if failing to do so is failing to be competent.
>It's unreasonable to expect that criticisms be phrased politically to avoid stepping on oversensitive toes.
If you mean politely then no, it's not unreasonable to phrase criticisms rudely. It's unreasonable to phrase them rudely and then expect the recipient to do anything about it.
edit: Also, I said _needlessly_ rude. Are you saying the poster needs to be rude?
I’m saying your interpretation of “rude” is overly sensitive.
If I say “The USA needs to get its act together and fix its broken immigration system”, I don’t see this as particularly rude. By criticizing the immigration system, I’m already saying that it’s fucked up. The fact that I use the phrase “get it together” is irrelevant to both tone and content.
And again, the subject is a large group. The idea that particular individuals should take offense at such a mild blanket statement feels kind of ridiculous.
If I needed something from someone or a group at work and I told them to 'get their act together' and do it, I don't think I'd get what I want. And they're paid to work with me.
If you go to an individual and tell them they need to “get their act together”, you’re being confrontational. If you make an equivalent statement about a group of people referred to as a third party, it’s not nearly as confrontational. Do you really not see the difference between these?
You probably don’t feel bad saying something like “McDonald’s burgers suck”, but if you tell someone who invited you to a cook-out that their burger sucks, you’re an asshole. Context and audience matter.
And people very much do talk like this is real life. People who understand context and audience can do so just fine.
gtk supports emacs style bindings. Put `gtk-key-theme-name = Emacs` under `[Settings]` in ~/.config/gtk-3.0/settings.ini. Doing `gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"` might help too. That will work in firefox/chrome too.
There are 3 clipboards, at least. Cmd-C/Cmd-V most everywhere, Ctrl-K/Ctrl-U/Ctrl-Y in most text fields, and select/middle-click in Terminal.app. It's like having 3 hands, I find it works well.
And the workarounds for multiple clipboards are SO painful. Disabling the extraneous ones is impossible and syncing them works until it DEFINITELY doesn't.
you can do that with xdotool if you want to paste the xbuffer. I suggest handling the shortcuts at the window manager level. this force ctrl-c to always do copy - even in the terminal, but nothing stty can't fix quickly - I use ctrl-x instead as it is close by.
end result, my ctrl c and ctrl v work as you would expect -- always!
I'm using xorg but very interested in Wayland. My main "fear" with wayland is that my scripts to properly handle things like a uniform copy/paste will stop working
Would you have some links? I am especially interested in ways to handle shortcuts like with autohotkey on Windows: a context dependent remap (ex: pressing a given physical key may send ctrl-tab in an application, but ctrl-pagedown in another if said other application doesn't support remapping shortcuts)
Handling shortcuts would be compositor specific. Unlike X, the display server part with Wayland is implemented by the compositors. Wayland itself is just the protocol.
On a Mac, you can cut/copy/paste using predictable keystrokes in any application, anywhere. And there is a single clipboard. On Linux, you have to deal with a multitude of behaviors (middle mouse button, Ctrl-C, others, and does it paste where the cursor is or do you have to click the middle mouse button exactly where you want stuff pasted, etc).
And I'm not even talking about multiple media types: all I need is plaintext.
The second dream wish would be for consistent keybindings in all text input boxes, like in Mac OS. Such as make Ctrl-A always go to the beginning of line, Ctrl-E always to the end, and Ctrl-K always kill whatever is in there.
If I had that, I think I could use Linux without getting annoyed every couple of minutes. I would still miss apps like TextExpander, flawless drag&drop, and lots of other things, but I could at least use it without frustration.
Unfortunately, none of this is likely to happen. If you wonder why, it's enough to look at the responses that will surely land here: