News for hackers. Stuff that matters.
Re:16-inch MacBook Pro by crusso on Wednesday November 13, 2019 @08:58AM (#21524042)
I remapped caps lock to escape and it's been wonderful. The oversized caps lock key on keyboards is an inexplicably bad UI choice anyway.
Re:16-inch MacBook Pro by DogLover_ on Wednesday November 13, 2019 @09:17AM (#21524292)
This argument as THE SOLUTION really needs to stop. As an example I mapped caps to ctrl a long time ago so this won't work without compromises.
Re:16-inch MacBook Pro by hinkley on Wednesday November 13, 2019 @05:24PM (#21530344)
Right? The solution is 'make the fuckin keyboard work'. These are workarounds.

I have twenty... seven, Jesus. Twenty seven years of muscle memory with VI. The only keyboard I can't 'vote with my feet' on is the built-in one on my laptop. As a result I'm hardly ever using my laptop untethered now. I don't think I've ever owned a keyboard I've typed less on than the touchbar macbook. Which means I'm barely using them as laptops, which is a little depressing.

Re:16-inch MacBook Pro by foldr on Wednesday November 13, 2019 @02:11PM (#21528162)
You can use Karbiner to have a short press of caps lock map to escape and a long press to control. Works pretty good.
Re:16-inch MacBook Pro by 2muchcoffeeman on Wednesday November 13, 2019 @03:41PM (#21529297)
I almost never use caps lock so I just mapped caps to esc and hold shift for all caps. The no escape thing doesn’t bother me anymore.
Re:16-inch MacBook Pro by fwip on Wednesday November 13, 2019 @02:27PM (#21528372)
Yep - I have mine set to be control if pressed with other keys, and escape if pressed alone. Works for everything except if I'm playing a videogame that uses ctrl to crouch.

Other people argue that all real vimmers use ctrl-[ instead of escape.

Edit: This is on a 2015 macbook pro, that still has the physical function keys. I almost never use the physical escape key, just capslock instead.

Re:16-inch MacBook Pro by qmmmur on Thursday November 14, 2019 @05:38AM (#21534375)
Is there a guide on this?
Re:16-inch MacBook Pro by foldr on Thursday November 14, 2019 @08:39AM (#21535240)
Install Karabiner-Elements. Go to the "complex modifications" tab. Add "Change caps_lock to control if pressed with other keys, to escape if pressed alone".
Re:16-inch MacBook Pro by qmmmur on Thursday November 14, 2019 @04:38PM (#21539724)
Thanks mate.
Re:16-inch MacBook Pro by philwelch on Wednesday November 13, 2019 @05:12PM (#21530199)
Can you map ctrl to esc?
Re:16-inch MacBook Pro by Tsiklon on Wednesday November 13, 2019 @09:10AM (#21524197)
Personally I find a classic Unix layout to work best for me. I’ve mapped the caps lock key to CTRL. I use that far more than I ever use caps, it feels quite natural to me after about a week or two of adjustment.
Re:16-inch MacBook Pro by PascLeRasc on Wednesday November 13, 2019 @09:18AM (#21524319)
You can use Karabiner Elements to configure your Caps Lock to act as Ctrl when held down, and escape when tapped alone. Best of both worlds.
Re:16-inch MacBook Pro by matttb on Wednesday November 13, 2019 @10:31AM (#21525211)
In addition to this you can do something like mapping Shift+Caps Lock to be an actual Caps Lock toggle. Now you get 3 buttons for one and it works amazingly well.
Re:16-inch MacBook Pro by darkteflon on Wednesday November 13, 2019 @06:00PM (#21530708)
This was a revelation when I discovered it earlier this year. I could never go back now, it’s so convenient.
Re:16-inch MacBook Pro by ghaff on Wednesday November 13, 2019 @09:17AM (#21524303)
>The oversized caps lock key on keyboards is an inexplicably bad UI choice anyway.

It's probably largely a relic from typewriters when it was originally something of a mechanical necessity and then made more sense than today in the context of filling out forms etc.

Re:16-inch MacBook Pro by macintux on Wednesday November 13, 2019 @09:43AM (#21524622)
Sun and Apple both used to have control in that spot. It was a sad day when they surrendered to the inferior PC keyboard layout.
Re:16-inch MacBook Pro by ghaff on Wednesday November 13, 2019 @09:58AM (#21524819)
I used to have really strong opinions about keyboards. I even still have a Northgate keyboard which was an "improved" version of the original IBM keyboard. (Which largely mirrored the Selectric.)

But TBH, I use so many different systems these days that I pretty much just accept that keyboard layouts and keyboard feel are going to differ from machine to machine and there's no point fussing about it.

Re:16-inch MacBook Pro by ghshephard on Wednesday November 13, 2019 @01:45PM (#21527781)
I haven't used a laptop, desktop, or other computer (windows/mac/Linux) in the last 15 years in which I didn't immediately configure Caps-Lock to be control within 5-minutes of setting up the system. So, to some degree - it's always been control for me.
Re:16-inch MacBook Pro by dublin on Wednesday November 13, 2019 @01:52PM (#21527881)
FWIW, early PC keyboard layouts had the Control key next to the "A", where God intended it to be, too. (Don't have the link handy, but there was a story posted here on HN in the past week or so about the history of the PC keyboard that showed this...)
Re:16-inch MacBook Pro by wyclif on Thursday November 14, 2019 @07:24PM (#21541106)
True, and as a longtime fan of the IBM Model 'M' that had that configuration and was mechanical and built to last with buckling springs, I'm glad I can get one of these:

https://www.pckeyboard.com/page/product/40PSA

Re:16-inch MacBook Pro by ImprovedSilence on Wednesday November 13, 2019 @03:31PM (#21529181)
I remapped jk to escape. It’s easily my favorite remap, I don’t even bother with escape on full keyboards/desktops.
Re:16-inch MacBook Pro by Lio on Thursday November 14, 2019 @07:37AM (#21534908)
That's a bit of a pain if you put that into muscle memory and use other Vi interface software that can't be remapped.

Personally I'm in the Caps to Ctrl and use Ctrl-[ for escape camp. Works in my shell, REPLs and in my database clients and anywhere else with a readline interface that isn't Vim.

Even with that I still want a physical escape key.

Re:16-inch MacBook Pro by goerz on Thursday November 14, 2019 @12:04AM (#21532924)
how do you type "e_{ijk}"?
Re:16-inch MacBook Pro by ImprovedSilence on Friday November 15, 2019 @07:22AM (#21544241)
jk is a pretty rare combo to begin with, but when you do need it, just hitting j, and pausing for a second takes that input singularly, then you can type k safely. Slightly sub optimal, yes. But the benefits outweigh the negatives for me.
Re:16-inch MacBook Pro by L3viathan on Friday November 15, 2019 @05:38AM (#21543816)
For example by typing: e_{ij<c-v>k}
Re:16-inch MacBook Pro by stevehawk on Thursday November 14, 2019 @09:11AM (#21535446)
obligatory xkcd - https://xkcd.com/1172/