Update: As of MacOS Sierra 10.12.1,
the remapping of Caps Lock
to Escape
can be done natively in the Keyboard System Preferences pane.
Follow the steps below to remap Caps Lock to Escape (without relying on 3rd party software).
- Open System Preferences and click on
Keyboard
- Click on
Modifier Keys...
- For
Caps Lock Key
, chooseEscape
- Click
OK
The Old Way of Using Seil
Seil
(previouly known as PCKeyboardHack) is great tool for mapping keys on Mac.
Let me illustrate how to use Seil
.
As a heavy Vim user,
I find it is necessary to swap the Caps Lock
key with the Escape
key.
-
Change the behavior of Map Caps Lock Key to No Action on Mac.
- Open
System Preferences
- Open
Keyboard
- Open
Modifier Keys...
- Change
Caps Lock Key
toNo Action
- Open
-
Map the behavior of Caps Lock key to the Escape key using
Seil
.- Click on
Change the caps lock key
inSeil
- Check
Change the caps lock key
- Fill 53 (keycode of Escape) in the keycode text box
- Click on
-
Map the behavior of the Escape key to the Caps key using
Seil
.- Click on
Other keys
inSeil
- Check
Change Escape
- fill 57 (keycode of the Caps Lock key) in the keycode text box.
- Click on