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

Remap caps lock to control, and you'll be a lot more comfortable.

Unless you use that other text editor, you know, the one that makes you always have to reach for the escape key...in that case, I suppose you should map it to escape instead.



Except there's a 200ms delay on the Capslock key to prevent accidental activations. Because this is built into the hardware, it means that even if you remap, if you press the second key really quickly after the first, the character ends up getting inserted into your document. It's ridiculously annoying.


Source? My capslock is a control key and I use it heavily so I feel like I'd notice a 200ms delay, which makes me doubt it's done in hardware


Apple released a firmware fix that makes the Capslock key behave normally if it's remapped in OS X. However, I don't use OS X, and the keyboard doesn't send the event until after the delay (if I just tap the key quickly, Linux/Windows don't see anything), so I assume it's some combination of keyboard firmware + OS X.

http://support.apple.com/kb/TS1578 http://www.tow.com/2007/12/18/apple-wireless-keyboard-review...


OS X turns off the delay if you map that key to something else. The only workaround I've found in Linux is to force the LED on with setleds so that the hardware thinks it doesn't need to enable the delay.


Not for me - I've had two Macbooks in the last two years for work, and both of them suffered this problem, which makes developing in Vim super annoying (I remap Caps_Lock to Esc).


Thank you so much for this! I have looked for a workaround for the last four years, literally.


  echo 'inoremap kj <Esc>' >> ~/.vimrc # works like a charm


Wouldn't work too well in Dutch where the kj happens quite a bit in various words.


Hear, hear. Remapping capslock to control is one of the first things I do upon setting up a new OS, and I use vim. ctrl+[ is equivalent to esc, and with the Control key easily accessible from the home row I still get to use the window manipulation features (which all use control chords) in Vim without inducing carpal tunnel syndrome.


you always have to reach for the escape key

Nonsense. Map caps lock to control regardless of whether you're an emacs or vim user. If you use vim, control+c does the same as escape and since vim does still use control sometimes, it makes sense to keep control easy to access and just use that (IMHO very easy to press) key combo instead.


Nitpick - ctrl-c isn't exactly the same as esc (it doesn't invoke certain autocommands).

But ctrl-[ is exactly the same.


I owe you a beer. Why the heck have I not thought of that before?


Just in case you didn't know, this is really easy to do: System Preferences > Keyboard > Keyboard tab > Modifier Keys.




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

Search: