There is an unintended benefit to putting an obstacle between people who don’t know how to use the terminal and pasting code into it.
Expanding on this, we could make it so that root must use ed(1) to edit files?
“Ed is the standard text editor.”
you’re evil. i love it.
Ha! Butterflies!
No, only vi
vi is so outdated, we use viii now. You’re two versions behind!
Centre click is a godsend though. I recently had to start using Windows again and I keep instinctively hitting it.
One of the first things I had to disable when I switched to linux lol Middle click has so many other uses in windows that made it sooo jarring. Ctrl c and crtl v are good enough for me. (Or shift in terminals)
Middle-click often works when ctrl+c/ctrl+v won’t. It’s also a separate buffer giving you the ability to have two different things copy/paste-able
My patch to add Copy/Paste keycode support to the Cosmic Terminal was merged!
As someone who likes Rust but dislikes the look of COSMIC, are there plans to allow theming?
There are already settings to change some of the colors used.
For the terminal in particular there is an option to hide the menu bar, making it look as Foot or Alacritty do.
Holy fucking shit. I just realized that’s why Ctrl + C and Ctrl + V don’t work in Micro. This has been eye opening.
I have been trying to bind ctrl c to copy in micro and alacrity, I can’t find a way.
Always a pleasure to meet another Micro user.
xclip?
weird – they work for me. ctrl+c sends SIGINT, and ctrl+v iirc isn’t treated specially. i figured sending SIGINT with kill would then preform a copy, but it doesn’t. fuck. now i have another puzzle…
Control+C is used to kill a process in the terminal and that shouldn’t be overwritten. If it is, you’d have to create a totally separate key binding to kill a process. Seems unnecessarily complex when Control+Shift+C works just fine.
The article doesn’t suggest using Control+C. It talks about dedicated copy and paste key codes, and you can program your keyboard to map those codes to whatever keys you like. They suggest Fn+C.
standards.xkcd
I think at this point XKCD should be a TLD.
I would join lemmy.xkcd in a heartbeat.
Holy shit can you guys read the article please? It’s an existing standard and a dedicated keycode
We could use Ctrl+Insert and Shift+Insert like in the last three decades, but some of these keyboards apparently forgot about the Insert key.
Well yeah but shift insert is annoying as hell since the keys are so far apart
I confirmed that these already supported a number of terminals plus QT and GTK. They could also be mapped to be more ergonomic with a programmable keyboard:
- Control+Insert: Copy
- Shift+Delete: Cut
- Shift+Insert: Paste
But Shift+insert currently pastes the primary selection, not the copy-paste clipboard. So it doesn’t do the same as Ctrl+V.
It depends. In Firefox, Chrome and LibreOffice, Shift-Insert pastes the clipboard, not the selection. Viva Linux!
what about shift+insert amd ctrl+insert thats literally already there
Because lots of people don’t have an insert key?
Well, the article proposes to use dedicated copy and paste keys. If you don’t have an insert key, you probably don’t have those either.
Control+C is used to kill a process in the terminal and that shouldn’t be overwritten.
Agreed. The post didn’t suggest that.
Seems unnecessarily complex when Control+Shift+C works just fine.
For people already using programmable keyboards global copy/paste shortcuts are a nice perk.
I spend nearly all my day in a browser or a terminal and as I use a terminal and browser that already support this, the effect is 99% complete.
Come on, having a 3-key combo for such a common task is a PITA. There’s a reason people have been complaining about this for decades.
The first time you accidentally type Control-C into a terminal and cancel an important process when you meant to copy some text it becomes a PITA.
Exactly. I do it pretty regularly and I’ve been using Linux for 20 years.
And yet people here are still saying “no biggie”. It’s pure status quo bias.
No, it’s recognising that terminal has its own rules and the learned Ctrl+C for copy has no sense… Okay, C-Copy. Some sense. Now, Ctrl+V for… vaste? :)
All while having an Insert fucking button.
In the end, me personally does not care as long as Ctrl+C continues to be the process-killer
I feel like you may have misunderstood the article. It’s talking about how support is increasing for dedicated Copy keys, and that programmable keyboards make it easy to use dedicated Copy keys. The article does not mention changing the behaviour of Ctrl-C.
Kitty has a setting that makes Ctrl-C copy text, but only if you’ve selected something. If you haven’t it does a regular break. Best of both worlds!
Another KiTTY user! Can you share that setting?
Had to look it up for you. I use (in kitty.conf):
map ctrl+c copy_and_clear_or_interrupt map ctrl+v paste_from_clipboard
Obviously you only need the first one for the copy bit but having paste as well is nice.
Sun keyboards had dedicated copy and paste keys.
Also the illusive “Stop” key that you needed to break into the boot rom.
That’s what I came here to say. What’s the point in making an unnecessarily complex “hack” to circumvent what shift-control-c and v does? I’ve never had a problem with it. And there’s something to be said for not making it super easy to paste text to a terminal, especially from places online…
sigh can’t believe that no one mentioned that there is a default set of shortcuts that are used across all GNU programs, and it’s been the default since way before Ctrl+C/Ctrl+V existed. You can easily copy/paste stuff in any terminal using the same keypresses you would on Emacs, I.e. Ctrl+space to start selection, Alt+W to copy and Ctrl+Y to paste. In fact you can navigate the entire line the same way, not just copy/pasting but moving back and forward, selecting and deleting stuff, e.g. Ctrl+A Ctrl+K cuts the entire line.
Unless you activate Vi mode (which most terminals support) and then you can use the same keypresses you would on Vi, including
ci"
and other cool stuff that’s much more powerful that simple copy/paste.There is a default, it’s just not the same as word uses.
You describing a kill ring which is internal to the shell and not synced to the system clipboard. Nor does it work in GUI apps.
The benefit of universal bindings is not have to learn one method for GUI apps, another for terminals and a third for shells implementing the kill-ring like bindings.
Ctrl+Ins gang rise up
I’ve been using ctrl+c for copy and ctrl+v for paste for over a decade in my linux terminal by remapping the interrupt to ctrl+x.
It’s basic ergonomics and user friendliness.
I do it on all my personal devices and servers.
Nothing bad happened in those ~15 years that I’ve been doing that. What the fuck are you arguing about?
I might actually do that too, but not for ergonomics. I’m just going nuts with sometimes ctrl-c,. sometimes ctrl-shift-c, sometimes ctrl-ins
Honestly, this is a nice feature of macOS (or at least iTerm 2; I don’t use the official terminal). I know CTRL-C is used to kill processes and we all have that muscle memory but I usually try to change that on my personal Linux installs because I’ve hit it by mistake before.
I used to use CTRL+INSERT for copy and SHIFT+INSERT for paste but there’s usually no insert key on laptops or even small keyboards. It’s probably time to just adapt.
⌘C and ⌘V work in the native MacOS terminal app as well.
It’s the #1 thing that drives me crazy about Linux.
It seems obvious. You’ve got a Windows/Apple/Super key and a Control key. So you’d think Control would be for control characters and Windows/Apple/Super would be for application things.
I can understand Windows fucking this up, cuz the terminal experience is such a low priority. But Linux?
There’s some projects like Kinto and Toshy which try to fix it, but neither work on NixOS quite yet.
I use Ctrl, Alt for applications, Super for the os/windowing. I hated MacOS which mixed these things. Luckily X.org let’s you do whatever you like, sometimes it’s just harder to configure. But I like it as it is.
I have a typematrix keyboard.
there’s a growing adoption of keyboards with custom firmware– programmable keyboards
- There’s an error
- You have computers? We have computers to send keystrokes to our computers!
Edit: i mean, there’s software to remap your keyboard.
I found this handy snippet to enable these keys in GTK 2 and 3 (not sure of the equivalent for GTK 4 but I guess that’s the one which has been updated anyway): https://forum.colemak.com/topic/1438-dreymars-big-bag-of-keyboard-tricks-linuxxkb-files-included/#p10012
Unfortunately I’ve found this whilst I’m not at the right computer so I haven’t been able to test them.
Edit: I tested this and it doesn’t appear to have helped.
Wow. I haven’t seen a Sun keyboard like that in … geez forever. Whose were fun times. I was younger then.
Stop+a crew.
Back when a PROM really meant something.
You could also drop into a serious bios-style motherboard manager to really control booting and hardware configs.
I don’t want copy paste buttons support, I want the caps lock delay to be fixed. Yes, I use the caps lock not shift, as my brain can’t get used to using shift for caps. I’m so tired of typing like THis all the time. 😂 (I’m using a hack currently that helps, but it would be nice if it gets fixed on Linux in general).
That’s why we have mice copy/paste bindings on most systems too. Highlighting text auto copies, and scroll wheel click pastes. Not all do this, but many do and have for a while.
That’s a popular terminal feature, but I regularly get tripped up because my terminal has that behavior but my browser does not.
That’s what’s nice about a global solution.
Switch to a non-buggy browser.
There’s only two. One has broken primary selection, the other has anti-user policies against adblock plugins.
I can live without copy on highlight. But you could pry UBlock Origin from my cold, dead hands.
uBlock Origin and mouse copy and paste works perfectly well in Firefox.
Copy on select and middle mouse button paste doesn’t work in text fields created by js code in Firefox. I remember finding a stale bug report for it,
but can’t find it.There are a lot of websites that use javascript to create text fields, some recent examples that I can remember right now:
- codewars.com
- claude.ai
- vscode.dev
Edit: found report: https://github.com/codemirror/codemirror5/issues/931
https://bugzilla.mozilla.org/show_bug.cgi?id=1593761