Using Caps Lock as Esc in Mac OS X

前端 未结 14 797
清歌不尽
清歌不尽 2020-12-04 04:34

How do I make Caps Lock work like Esc in Mac OS X?

14条回答
  •  情深已故
    2020-12-04 05:02

    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:

    HIDKeyboardModifierMappingDst
    6
    HIDKeyboardModifierMappingSrc
    0
    

    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.

提交回复
热议问题