Lol. I came here to say the only thing that matters is that copy and paste in Linux is 'cntrl+shift+c'. You can try changing it, but your still fucked in most terminals, and then you end up with two key combos depending on context. It's a nightmare, and I'm really glad you have the top comment. Clearly I'm not alone.
Terminal is the only thing that maps ctrl+shift+c/v to copy/paste because ctrl+c/v conflicts with signals. I've never come across any other program that maps something that isn't ctrl+c/v to copy/paste.
MacOS is able to keep this consistent because ctrl+c/v isn't mapped to copy/paste, and instead command+c/v is. If you really want, Linux is perfectly capable of mapping Super+c/v to copy/paste. You would probably only need to do this in your terminal emulator and your DE.
Really not a good idea to remap super for copy and paste though.. that is just a very surface level thing to do I think and recommend to any mac user transitioning to Linux and is why I built Kinto.sh so that hacks like "remap Super+c/v" for copy and paste don't have to exist.
The proper way is remap the modifier keys and then remap further based on the app on focus. Gives you coverage whether you explicitly remapped an individual app or not.
I came to this thread just to post that System 76 should hire you to work on their keyboard shortcuts if they are serious about attracting macOS users. Muscle memory is the only thing keeping me on macOS now, I’ve tried using an IDE on both Windows and Linux and gave up after a couple minutes.
I tried kinto on Pop about a year ago and it worked pretty well but conflicted with their workspace and tiling key commands so never tried switching to it beyond a single days worth of preview.
Yea, I am not surprised. I actually was trying to target Pop_OS! to use as a daily on a desktop of mine, but... I had issues with the installer due to it not liking a network ethernet device I believe. I did get past that, but then I had an issue with wanting to use btrfs for snapshot features - the installer though does not setup your partitions correctly for that.
It felt like Pop_OS! went out of their way to rewrite the own custom installers and then just decided not to support btrfs for whatever opinionated reason? I dunno - but it made me rather unhappy with the situation and I switched back to my Ubuntu Budgie distro of choice. Sad - because I would have dog fooded Kinto.sh seriously on Pop_OS! had they supported btrfs properly w/ snapshot support. Most Ubuntu based distros don't change the installer so much that proper btrfs support is broken.
I do support them though and may purchase one of their laptops in the future and sure - I would love to work for System76 - despite not yet using their OS on anything besides a VM. I do think they get a lot right, and love that they open sourced their BIOS for their laptops. We need more companies like them selling Linux pre-installed.
Yeah, as the other person pointed out, it's not that simple.
Like yourself, I also thought Linux would be capable, until you actually dig in to do it and realize it's a nightmare of different conflicts.
For starters, that super key is usually for the main menu/dashboard in most Linux os's and intentionally not easy to remap.
Then each application has its own key mapping, so even if you change the system copy/paste, chrome and any other app may have it practically hard coded - they are not all configurable and that includes most terminal applications.
Seems so simple till you dig in and try to accomplish it. In the end, the best solution was to find a terminal app where I could switch the copy command with the cancel command, and then I just have to remember when I'm on my Linux system, cntrl+shift+c is to cancel a command. 1/2 the time I use the system terminal though, and then the command is back to Linux native.
So now I have to remember that special terminal app to use, and that the cancel command is different, on top of the fact the key binding are on different keys also.
It is annoying as hell. And that is ultimately why I end up using my work Mac, even for personal stuff I would prefer to be on Linux.
This almost works. This is what I initially tried to do. Just do a basic remapping of Control to Super in terms of key position. Then I tried to force my terminal to take Super-C, etc. to send the proper control sequence, and never succeeded. So, terminal windows and terminal applications became their own nightmare of special-casing, context-sensitive hell. My workflows bounce back and forth between lots of GUI stuff and terminal stuff, so I always have to be vigilant about what I'm copying from and what I'm pasting too. It's error prone and keeps me squarely out of fluid unconscious muscle memory speed-working.
Remapping the position of Control to the Super key just shuffles the annoyance around, unfortunately. I tried to live with it for a few months.
I think MacOS got something right by using its Command key for "desktop-wide" shortcuts that aren't specific to one application, (kind of) leaving Ctrl and Alt for applications.
I generally try to follow this pattern when possible.
But I really do wish that it was easier to get a consistent look and feel on Linux, including key bindings.
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.
The 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.
I 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.
I'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.
I 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.
Hmm. 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.
because 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.
Ah, I see. It looks like you have three similar reasons.
The first is something I guess I don’t do. If I select something that I want to paste somewhere, then I’m going to paste it right away; I already know exactly where it goes.
The second is that searching in applications you use frequently replaces the selection? That’s not how it’s supposed to work. Applications are supposed to claim the primary selection only when the user explicitly selects something, not merely when something is highlighted to make it more visible. Sad to hear that any application gets this one wrong; that’s supposed to be a pretty easy thing to get correct.
The third is about pasting into textboxes. This one is more subtle, but pasting from the primary selection into a textbox is supposed to replace the content of the text box, rather than appending to it. Certainly Firefox does for the urlbar, though to be honest I’m not sure that I’ve never noticed one way or the other if it does for anything else. Most of my text editing is done in Emacs, which doesn’t use textboxes very much, and which has a lot of other ways to quickly enter text without needing a lot of copy and paste.
Thanks for answering; it’s really interesting to see just how different people’s use–cases really are. I find selection to be more convenient because it’s simpler, while you find it to be less convenient because the programs you use aren’t as thoughtful, or because you use selection for other things. I guess we should both be glad that Linux implements both styles!
>The first is something I guess I don’t do. If I select something that I want to paste somewhere, then I’m going to paste it right away; I already know exactly where it goes.
I often want to paste things multiple times. e.g. I paste an interesting URL to an instant message chat, then maybe 10 minutes later I paste the same URL to someone else.
>The second is that searching in applications you use frequently replaces the selection?
suppose I didn't know what "appending" meant and I wanted to search for it. I can highlight it, rightclick, then choose "search Google". I don't want to paste "appending" anywhere, I just want to search Google for it. but the act of highlighting it will overwrite whatever is in the middleclick buffer. so if that's the only clipboard I had, searching the web would interfere with copypaste, which is stupid.
>This one is more subtle, but pasting from the primary selection into a textbox is supposed to replace the content of the text box, rather than appending to it.
again that's not what I meant. I'm talking about taking a portion of the text in one textbox and replacing it with the text from elsewhere. for example, suppose I want to change part of the message I'm typing right now with lorem ipsum. it looks like this:
Sure, I understand. You can also do that by reversing the order of the two operations (paste into the document, then select and delete the unnecessary text), or you can use both selections (select the text to be copied while holding down alt, then select the text to replace while not holding alt, and middle click from the secondary selection by holding alt).
But that’s not really the point; the point is that it’s nice to have both mechanisms available. Some people will find selections more convenient, others won’t.
Middle-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.
When 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.
> 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.
Note 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.
On 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.
¹ 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.
Are there any apps other than terminals that don't use ctrl-c? I can forgive that in a terminal app because it conflicts with SIGINT, but it would be very weird if a normal app like vscode did it differently.
Mind you, Mac has a similar annoyance with its command-C/V. If you work with Linux (+BSD) , Windows and Mac every day, as I do, be prepared to be frustrated a LOT.
I'd love if keyboards just had dedicated keys for this. It's used enough to warrant them (much more than other obscure functions like SysRq that do get their own key, or Apple's 19 function keys). I guess this is because I'm the DOS single task days there wasn't much of a need for copying and pasting.
You would think, but I'm a sys admin and
1) live in the terminal.
2) copy and paste to/from the terminal often
3) do not like accidentally cancelling a command when I just meant to copy something.
Apple gets around that issue by using a differnet modifier key. They have a different modifier key since the original Macintosh dropped the mostly standard control key. It was added to their Macintosh keyboards later, for interoperability with other systems. Windows, on the other hand, has the same issue as Linux. As soon as you call up a command prompt, they are using different shortcut keys.
> They have a different modifier key since the original Macintosh dropped the mostly standard control key.
The ctrl-z/x/c/v combination didn't exist when the Macintosh came out. The cmd+z/x/c/v existed on the Lisa (39 years ago!), so predates Mac by 2 years, which in turn predates Windows using by using ctrl-z/x/c/v by 8. Originally, Windows used the IBM CUA standard[0], which can still be used in Windows (KDE and Gnome came 13 and 16 years later respectively). If you're in a windows terminal, try ctrl+ins to copy and shift+ins to paste, works in Gnome and in KDE (with some remapping in Konsole.) Using ctrl-c in a *NIX based system seems like a dumb decision to me, since ctrl-c is SIGINT - kind of useful.
Get yourself a terminal that supports smart copy. It's a thing.
Tilix, kitty, Windows Terminal and others support using ctrl-c for both copy-to-clipboard and SIGINT.
To me it's a game changer and judging from the sibling comments, pretty much no one knows this is a feature that exists. Ctrl-Shift-C/V is barbaric and I have opened issues and merge requests to implement it in other popular terminal emulators.
That was actually what I ended up doing too.....but then I miss having tabs and go back to the system terminal, and Allacrity explicitly doesn't want tabs. Argh. It's all so anoying.
Yeah, I use my window manager for the tabs. They are very necessary, but I like it better when the WM does it instead of every app. You'd be surprised how often you want to have your browser and terminal tabbed together in the same window once it's an option. Plus, you don't have to remember ever app's tabbing hotkeys.
For various reasons, most Linux applications try not to use the Super (Windows) key for anything by default, which makes it a good candidate for use as a custom modifier key for whatever you want. For example, users of tiling window managers often use Super+... for interacting with their desktop (open a terminal, open a launcher, switch workspaces, swap windows, etc.).
There's nothing stopping you from deciding to use Super+c/v as copy/paste instead of Ctrl+c/v or Ctrl+Shift+c/v. Apple doesn't use Ctrl+c/v either... they use Command, so the conflict you're referring to doesn't exist there either.
Except that key binding for copy and paste are application specific and not always configurable, so indeed Linux echo system does actually stop you from making that sorta mod.
You can achieve this by using your own keyboard (one which has extra programmable keys) or by using Karabiner (or AutoHotKey or …) to make life easier for you. For instance, if you hold C down it could interpret that as Command-C.
I developed the utterly useless capacity to switch between Azerty / QWERTY and OS X/Debian/Win pretty seamlessly.
I will make a mistake, look à what I’m currently using a switch the layout internally.