Hacker News new | ask | show | jobs
by Lio 3490 days ago
> You can get C-c to be pretty much identical with a little remap > :imap <C-c> <Esc>

True but you're still out of luck in other Vi like places.

As an alternative I used Karabina in the past to map Caps lock into Esc (when pressed and released) and Ctrl (when pressed with another key). I think you could also make it latch as Caps lock by using Caps-Shift but I'm not 100% on that.

Does anyone know if Karabina has been updated to work with Siera yet?

2 comments

I assume you mean Karabiner. Their page still has a notice that it doesn't work with macOS Sierra.

https://pqrs.org/osx/karabiner/

I did mean Karabiner, thanks for the catch.

I've stayed El Capitan because I couldn't think of anything I found compelling in Sierra. I'll probably reconsider when Karabiner-Elements becomes a suitable replacement.

True but you're still out of luck in other Vi like places.

Agreed. I use set -o vi in bash and of course my little remapping is of no use there.

As an alternative I used Karabina in the past to map Caps lock into Esc (when pressed and released) and Ctrl (when pressed with another key).

This was something else I had suggested to me, but while probably about 50% of my computer use on a daily basis is on OSX, the other 50% is linux; for all of xkb's data-driven flexibility, I'm not sure whether it can do something like this. And I can't afford to build muscle memory for something I can only use on one platform.

It can. I've been using Caps Lock as Escape across Linux, FreeBSD, and OS X for 7 years now. The various gui interfaces to xmodmap even have an option to do the flip for you (at least in GNOME, Cinnamon, and KDE).
I've been using Caps Lock as Escape

That's easy - what @Lio was talking about was having Caps Lock be a tap for <Esc> and then holding it with another key would be <C->. Is that what you're talking about? Karabiner can accomplish this on macOS, but I can't find a gconf/gsetting/xmodmap combination to do this on Linux. Caps Lock as Escape is easy. Caps Lock as Ctrl is easy. Caps Lock as both doesn't seem to be possible on Linux.

Am I wrong? Can you point me toward more info on this? I'd really appreciate it - I would so love to be able to use tap-for-escape in all readline contexts.

That is exactly what I meant.

The worry about building up muscle memory around something not portable is exactly what lead me to force myself to use C-[ as Escape too.