Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.


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.


You can use Karbiner to have a short press of caps lock map to escape and a long press to control. Works pretty good.


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.


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.


Is there a guide on this?


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".


Thanks mate.


Can you map ctrl to esc?


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.


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.


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.


This was a revelation when I discovered it earlier this year. I could never go back now, it’s so convenient.


>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.


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.


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.


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.


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...)


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


I remapped jk to escape. It’s easily my favorite remap, I don’t even bother with escape on full keyboards/desktops.


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.


how do you type "e_{ijk}"?


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.


For example by typing: e_{ij<c-v>k}


obligatory xkcd - https://xkcd.com/1172/




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: