News for hackers. Stuff that matters.
Re:Ask HN: The most useful Mac keyboard shortcuts? by kevmoo1 on Monday August 05, 2019 @09:56PM (#20621344)
Not a shortcut exactly, but remap caps lock to ctrl.

So much easier in terminal and for using shortcuts like ctrl-A & ctrl-E for beginning and end of line, etc.

Re:Ask HN: The most useful Mac keyboard shortcuts? by geowwy on Monday August 05, 2019 @10:34PM (#20621580)
I found mapping Caps to Ctrl caused too much RSI.

It's better to use a full size keyboard and use two hands for keyboard combos, e.g. for Ctrl+A use right Ctrl, for Ctrl+N use left Ctrl, for Ctrl+E use right control. Takes a little while to master but it puts much less pressure on your fingers.

Mapping Caps to Esc is a good choice though.

Re:Ask HN: The most useful Mac keyboard shortcuts? by drunkpotato on Monday August 05, 2019 @10:52PM (#20621671)
It also makes it easy to use Ctrl-[ instead of reaching for ESC, which as a heavy Spacemacs and iTerm user is a lifesaver for me.
Re:Ask HN: The most useful Mac keyboard shortcuts? by srik on Monday August 05, 2019 @10:09PM (#20621415)
Or to esc. Saves my vim pinky a lot of grief.
Re:Ask HN: The most useful Mac keyboard shortcuts? by AdieuToLogic on Monday August 05, 2019 @11:06PM (#20621745)
> Or to esc. Saves my vim pinky a lot of grief.

FWIW, Ctrl-[ emits the ASCII code for ESC. So you can save that 'vim pinky' and have the remainder of control codes available to you as well :-).

Re:Ask HN: The most useful Mac keyboard shortcuts? by gknoy on Tuesday August 06, 2019 @03:23AM (#20622955)
I forget what the tool was, but I recall someone mentioning they mapped CapsLock to ESC when tapped, and to Ctrl when held.
Re:Ask HN: The most useful Mac keyboard shortcuts? by brookter on Tuesday August 06, 2019 @05:20AM (#20623592)
It's Karabiner Elements on the Mac.

On Linux you can get it to do the same thing with a combination of xmodmap, setxkbmap and xcape (but it's fiddly) and on Windows with AutoHotkey (but it's fiddly) — neither are as easy to use as Karabiner Elements, but they do work.

Re:Ask HN: The most useful Mac keyboard shortcuts? by allenng on Monday August 19, 2019 @03:56PM (#20741219)
Always the first thing I do on any new system. Caps lock is the most useless key in the most prime real estate.
Re:Ask HN: The most useful Mac keyboard shortcuts? by gumby on Monday August 05, 2019 @10:09PM (#20621412)
If you have a touchbar remap it to esc. I swapped my MBP for an air but kept the remapping.
Re:Ask HN: The most useful Mac keyboard shortcuts? by throw_away on Monday August 05, 2019 @11:33PM (#20621895)
with Karabiner, you can make it so that a tap of caps lock emits an escape, while still being able to use it as a ctrl modifier when pressed in conjunction with other keys: https://pqrs.org/osx/karabiner/document.html#configuration-c...
Re:Ask HN: The most useful Mac keyboard shortcuts? by procinct on Tuesday August 06, 2019 @02:04AM (#20622582)
I don’t think karabiner elements supports that and I believe that the old karabiner no longer works with current versions of Mac OS
Re:Ask HN: The most useful Mac keyboard shortcuts? by brookter on Tuesday August 06, 2019 @05:19AM (#20623578)
The latest version of Elements has supported this for several months, if not longer (I think they'd made it work for High Sierra at least, but I could be wrong about the exact timing.)

I use it for both Caps Lock -> Escape/Control and Return -> Return/Control and it's indispensible.

Re:Ask HN: The most useful Mac keyboard shortcuts? by paulcpederson on Monday August 05, 2019 @10:20PM (#20621494)
This is brilliant