Hacker News new | ask | show | jobs
by jmprspret 1396 days ago
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.
4 comments

On Mac, ctr+c is not bound to copy. cmd+c is bound to copy. ctr+c will interrupt in a terminal.

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.

I have used Windows all my life, and I learned this just now. No one ever told me that!
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.

Of course! Sorry, I did know this but I always forget macs have Cmd and Control
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.
On Macs, Cmd+C to copy and Ctrl+C to interrupt in the terminal i.e. they’re different.