How do I make Caps Lock work like Esc in Mac OS X?
Seil isn't yet available on macOS Sierra (10.12 beta). As such, I've been using Keyboard Maestro with these settings:
Credit to this github comment: https://github.com/tekezo/Seil/issues/68#issuecomment-230131664
In case you don't want to install a third-party app and you really only care about vim inside iTerm, the following works:
Remap CapsLock to Help as described here.
Short version: use plutil or similar to edit ~/Library/Preferences/ByHost/.GlobalPreferences*.plist
, it should look similar to this:
<key>HIDKeyboardModifierMappingDst</key>
<integer>6</integer>
<key>HIDKeyboardModifierMappingSrc</key>
<integer>0</integer>
Restart! A simple log-out and log-in did not work for me.
In iTerm, add a new key mapping for Help: send hex code 0x1b, which corresponds to Escape.
I know this is not exactly what was asked for, but I assume the intent of many people looking for a solution like this is actually this more specialized variant.
Since macOS 10.12.1 it is possible to remap Caps Lock to Esc natively (System Preferences -> Keyboard -> Modifier Keys).
You can also use DoubleCommand to remap this, and other keys.
IIRC, it will map Caps Lock to Esc.
Karabiner-Elements A powerful and stable keyboard customizer for macOS. (freeware)
https://pqrs.org/osx/karabiner/index.html
Worked for me for Mojave to change caps-lock to backspace
It is now much easier to map the Caps Lock key to Esc with macOS Sierra.
Open System Preferences → Keyboard.
Click the Modifier Keys button in the bottom right-hand corner.
Click the drop down box next to the hardware key that you’d like to remap, and select Escape.
Click OK and close System Preferences.
https://9to5mac.com/2016/10/25/remap-escape-key-action-macbook-pro-macos-sierra-10-12-1-modifier-keys/