Hacker News new | ask | show | jobs
by tedivm 2896 days ago
Remapping the "caps lock" key to ESC has worked out really well for me.
4 comments

It makes no sense to remap a home row key to such an infrequently used key. It's much better to remap Caps Lock to Control (by the way, how do you press Control A and Control E and Control L and Control R hundreds of times a day in bash? By reaching to the far away corner located Control? That's absolute madness).

Traditional UNIX keyboards had the control key in the position of where the caps lock key is now. If you remap your keyboard like that, bash and the Emacs shortcuts enabled throughout macOS will suddenly make A LOT of sense. After a few days it will seem be impossible to work in any other keyboard, which is further proof that the remapping is essential for working efficiently in a Unix environment.

I would personally remap the far away control key to act like an Escape key instead.

Sure, if you're a vi user, the caps lock as ESC will seem rational at first, but outside of vi, all other Unix tools work with control key combinations.

Map it to both. Single tap is escape, hold is ctrl.

https://github.com/jasonrudolph/keyboard

It works super well. I can hit key combos that would normally be tricky super easily.

Now if only I could find a way to standardize my hotkeys across sublime, chrome, vim, terminal and tmux. I’ve gotten close but not where I want to. (As an aside, does anyone know how to make ctrl+w delete the word left to the cursor in chrome and put it in the buffer like in the terminal (and also do the same for subl)?)

> Traditional UNIX keyboards had the control key in the position of where the caps lock key is now

Couterpoint: when I was working at Lucent around 1999, they gave me a Sun workstation with a keyboard that had Esc instead of Caps Lock. There were others that had a Control key there, though.

Edit: I'm searching online and can't find a Sun keyboard with that layout. Now I'm wondering if I misremembered...

That's interesting. All the Sun keyboards that I have seen have the control key in the place of the caps lock key. I do know that some had the Esc key closer to the home row (back-tick position, I believe).
This is exactly what I've done. CapsLock -> Ctrl, Ctrl -> ESC.

It actually improves the ergonomics of bringing up the Force Quit dialog (my primary use of the ESC key, since I'm not a vi user).

I do this even though I don't currently have a TouchBar model.

> It makes no sense to remap a home row key to such an infrequently used key.

1. Having never used caps lock in years, I think any remap is an improvement.

2. I'm guessing you don't use Vim ;) For me, esc is one of my most frequently used keys.

> Having never used caps lock in years

THAT KEY HAS A LOT TO ANSWER FOR

And to be fair to Apple, they make this remapping super-easy to do. No hacks, weirdness or third party tools are required.
Only if you want to remap to Esc. My preference is to set it as Delete. That I can not do w/o 3rd party apps.
I don’t have a touch bar but I do this too. I have it mapped to escape when pressed on its own and Ctrl when pressed with another key and that works great.
This is really interesting. Did you have to do anything special to make it work in OSX?
Yeah, install Karabiner Elements. It's a handy tool that will let you do a lot of keyboard customization.
Me too. I really hope this catches on.