Being able to CMD+c to copy things in a terminal is one of my favorite things about programming on a Mac. Ctrl+c to copy everywhere, except the terminal (there it instead is an interrupt) is a major annoyance working in Linux
The default is usually ctrl-shift-c to copy and ctrl-c to send sigint - but setting the copy command to ctrl-c will usually flip them, making sigint ctrl-shift-c.
I enable this on basically all the terminals I use. I also immediately rebind cmd to ctrl in mac, since I can't stand the RSI inducing placement of the cmd key.
Ctrl-v was SIGINT long before it was a shortcut for paste (first added in Windows 3.1). Although it can be switched now, it hasn't always been so. Of all the things that desktops (I'm not going to say Linux, as it isn't a Linux issue as it affect every system that uses KDE/GNOME and the like) designed to run on top of *nix like systems that were copied from Windows, this one really boggles my mind.
I don't use a Mac. How does one interrupt a program if Ctrl+C is bound to copy? At this point when I'm in a terminal Ctrl+C is muslce memory for interrupting a running program.
Macs have a Meta key called Command that can be dedicated to the shortcuts defined in GUI applications while leaving Ctrl free to be used by console stuff. So all the GUI copy/paste/windowing etc controls use Command key shortcuts.
The original 1984 Mac keyboard did not even have a Ctrl key, it was added to later keyboards as people wanted access to terminal applications.
Ctrl-C is still bound to an interrupt — it’s Cmd-C (i.e. Super-C / Win-C) that is bound to copy. Most things that a regular user can think of (paste, print, select all, to name a few) that would be control mapped in user facing programs are typically mapped to the “command” key instead.
horsawlarway|3 years ago
The default is usually ctrl-shift-c to copy and ctrl-c to send sigint - but setting the copy command to ctrl-c will usually flip them, making sigint ctrl-shift-c.
I enable this on basically all the terminals I use. I also immediately rebind cmd to ctrl in mac, since I can't stand the RSI inducing placement of the cmd key.
sbuk|3 years ago
jmprspret|3 years ago
wodenokoto|3 years ago
On Windows, ctr+c in a terminal will interrupt a running process, or, if text is highlighted, will copy that text instead of interrupting.
It works really well, and took me a long time of doing this without issues to realize what I was actually doing.
kalleboo|3 years ago
The original 1984 Mac keyboard did not even have a Ctrl key, it was added to later keyboards as people wanted access to terminal applications.
samtheprogram|3 years ago
gregsadetsky|3 years ago
tasuki|3 years ago
trebbble|3 years ago
prmoustache|3 years ago
Example on Kitty, my current preferred terminal emulator this is just a few map directives away in the config:
map ctrl+c copy_to_clipboard
map ctrl+v paste_from_clipboard
map ctrl+shift+c send_text all \x03
unknown|3 years ago
[deleted]