4 ms·
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 C
by knazarov 2y ago
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
- schindlabua 2y agoThen how do you SIGINT?
- pcthrowaway 2y agoI 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.
- einsteinx2 2y ago> 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.