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

I had no idea you could use C-[ as ESC


It's also a kinda crappy alternative, because it's not possible on a large number of non-English keyboard. Ctrl+c is also an option, although I think there's a slight difference.


ESC is 0x1B, traditionally the CTRL key reset the two highest bit of the ASCII code, [ is 0x5B, if you reset the two highest bits of 0x5B you get 0x1B which is why ESC and CTRL-[ are the same thing.

CTRL-C is completely different.


Yep, ctrl+c is different than esc


I am on Windows and it seems that not every program accepts C-[ as ESC. However Vim in Cygwin does accept it as ESC.


I wonder how many vim users have tried using CTRL + [ for the first time today. Muscle memory being what it is I fully expect that nobody will swap over to this new and improved Apple way of pressing the Escape key.


Much to my surprise, after I was forced by circumstances to use Ctrl+[ for a month or so, I found I didn't actually want to go back to Esc.

Had it only been a week or two I suspect my muscle memory wouldn't've shifted though.


And vi too - works just fine, but you have a valid point about muscle memory, which is pretty much the only kind of memory many of us have left when it comes to vi-like editors, since the key sequences disappeared from our brains decades ago!


That is kind of cool! It is much easier to hit then ESC all the way up in the northwest corner of my keyboard.




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

Search: