News for hackers. Stuff that matters.
Re:Some Terminal Frustrations by knazarov on Monday February 10, 2025 @11:19AM (#43001979)
For copy-pasting text to/from the terminal, I prefer to use Mac shortcut Cmd+C. It doesn't work out of the box on Linux (you have to use Ctrl+Shift+C, because Ctrl+C sends SIGINT). But there's a simple way to make Cmd+C work universally across all apps by rebinding Cmd+C to send Ctrl+Insert and Cmd+V to send Shift+Insert. It turns out these alternative keybindings work everywhere (browsers, GUI apps, terminal, etc). I use keyd to do that in software, but some QMK keyboards can do that rebinding on the keyboard itself.

This is my keyd config:

  [ids]
  *
  
  [main]
  capslock=overload(control, esc)
  leftalt=layer(meta_mac)
  leftmeta=layer(alt)
  
  [meta_mac:M]
  c=C-insert
  v=S-insert
Re:Some Terminal Frustrations by schindlabua on Monday February 10, 2025 @12:19PM (#43002675)
Then how do you SIGINT?
Re:Some Terminal Frustrations by mook on Monday February 10, 2025 @12:40PM (#43002917)
What they're saying in Linux terms is that they map Super+C to Ctrl+Insert, so Ctrl+C still sends SIGINT.

See also IBM CUA: https://en.m.wikipedia.org/wiki/IBM_Common_User_Access

Re:Some Terminal Frustrations by knazarov on Monday February 10, 2025 @02:49PM (#43004410)
Right. Ctrl+C is still mapped as usual.
Re:Some Terminal Frustrations by pcthrowaway on Monday February 10, 2025 @01:55PM (#43003759)
I don't remember if I did any special config in iTerm or installed a nonstandard package (I don't believe I did), but in Mac I often find it easier to just pipe a result I want copied into the `pbcopy` command in order to capture it in the clipboard, rather than trying to highlight what may be a long output.
Re:Some Terminal Frustrations by einsteinx2 on Thursday February 13, 2025 @07:10AM (#43035092)
> I don't remember if I did any special config in iTerm or installed a nonstandard package (I don't believe I did)

You are remembering correctly, pbcopy (and it’s partner pbpaste) are preinstalled on all Macs as part of the OS.