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

Actually I have remapped Caps-Lock to ESC and when pressed longer than a few ms to Ctrl system wide for years, with the Karabiner app.

I read about that neat productivity boost that also reduces the strain on your left hand a lot in a blogpost which "sold" this idea as "this is how VIM was intended to work" and I really love it. Useful even for normal terminal combos like Ctrl+C.

Only downside is, once you get used to it, you just can't go back ;-)



Sadly on macOS Sierra, you have to use Karabiner-Elements, which doesn't (yet, I hope) include support for long-press=ctrl.


If you're fine giving up caps lock, Sierra makes it easy to remap caps lock to esc in Systems Preferences (it even disables the little green light on the key)


Sadly, that isn't as powerful as what our comment-ancestors do with Karabiner. Such an accessible and prominent key as Caps Lock is, IMHO, wasted if only used for ESC; using it both for Control when in combinations and ESC when alone makes the most sense.

I use Caps Lock for Cmd or Ctrl, depending on which keyboard I'm using, and <Leader><Leader> for Escape on Vim.

I don't know where I got this idea from, but I also use <Leader>w to exit to normal mode and save. It's so ingrained in me, that when I use other editors very often I have "Unexpected token" errors because of a ",w" in the middle of the code.


Wow, that's news to me! How I've waited for Apple to do this. Karabiner-Elements does some shady stuff with the kernel and in my experience makes the machine a lot less reliable.


There is a pull request to implement this feature: https://github.com/tekezo/Karabiner-Elements/pull/247

I haven't tried it myself. Honestly it's one of the things keeping me from upgrading to Sierra. Need to test it out first.


I am surprised to learn that the set of people who use vim and the set of people who have patience to "long-press" intersects!


FWIW you can also use Keyboard Maestro to solve this problem.


I use Keyboard Maestro for exactly this purpose. For the most part, it is great. However, it does just stop working every now and then, at least for me, which is mildly irritating.


> once you get used to it, you just can't go back

So true. So many capital letters typed and deleted.


Any way to do the remap with Gnome on Linux?


gnome-tweak-tool --> Typing --> Caps lock key behavior --> (near the bottom) select the swap option




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

Search: