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

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.




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

Search: