Hacker News new | ask | show | jobs
by danielvinson 1828 days ago
Tried playing on my Macbook, but ran into problems since it requires an Esc key in a bunch of places, which Apple has for some reason basically removed completely. It looks cool though.
5 comments

In Keyboard pref pane, Modifier Keys, you can map other keys to Escape. I mapped Caps Lock.
FWIW, new model macbooks have a physical escape key next to the touchbar
Doesn't Control-[ work?
I've never heard of that combination, I can try it out. I googled this yesterday and searched for solutions and never saw that mentioned anywhere.
I have a Karabiner-Elements "Complex modification" rule that changes ^[ to an ESC keypress everywhere in the OS. I don't recall where I got it. My karabiner.json has this https://gist.github.com/philsnow/b820d96c69ccd2d4f86cb2a573a... , maybe you can figure out how to paste that in
Looking any an ASCII chart, yep, that is the correct control code.

(That's old-school!)

2020 Macs and beyond have the Esc key again.

Can't you add Esc to the control bar?

You used to be able to do that, but they removed it in the most recent update.
If "most recent update" is any version of Big Sur, at the least, you should be able to remap caps lock (or control, option, command, or on an M1 Mac even the Fn key) to escape in the "Modifier Keys..." section of Keyboard System Preferences.

(I was going to say that I still have the Escape key on the Touch Bar for my work laptop, which is true, but then I remembered it's running Catalina...)

Yep, Big Sur update. Unfortunately I can't map to Caps Lock because I have a habit of hitting that key a lot and in most apps I use Escape does a lot of unpleasant things when you hit it accidentally. Another commenter mentioned using Control+[ which seems to work for me.
So Big Sur 11.4 drops it? Because apparently I haven't installed that yet and I still have the escape key in the touchbar.
I'm running 11.4 on a MacBook Pro without a physical escape key, and the escape key remains present in the Touch Bar. I'm genuinely confused as to what the problem is.
How does vim work on a Mac?
If you have a Mac that has a physical escape key, great. :)

(My impression is that escape-key-free Macs are an anomaly that Apple is now quietly trying to sweep under the rug; AFAIK, all current Macs have physical escape keys, and there are persistent rumors the whole Touch Bar idea is being replaced by a new revolutionary Apple invention called "function keys".)

Very pooly, the only easy option is to rebind Caps Lock to be Escape, but Apple doesn't let you rebind any key or combination, just Caps/Control/Option.
You can use Ctrl-C, alternatively.