But seriously, I have hitting escape muscle memory engrained, I cannot remap it to any key because I won't ever think to hit capslock even if it's ergonomically "better"
I just instinctively did it to see my motion and it's an awkward feeling for me to move my left pinky over to the capslock key, definitely something I have to be mindful of doing to make happen and probably will take a long time for me to get used to.
Meanwhile, I actually extend my ring finger up and barely touch the escape and move it back down, all of that is very comfortable for me and I can do it without looking 100% of the time and never miss it.
Currently just have Esc on the CapsLock.
Add this config to ~/.config/karabiner/assets/complex_modifications/custom-capslock.json
{
"title": "Change caps_lock to Esc and Control",
"rules": [
{
"description": "Post Esc if Caps is tapped, Control if held.",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "escape"
}
]
}
]
}
]
}
and then in the GUI enable it in the Complex Modifications tab. Last you need to map "capslock" to "left_control" in the Simple Modifications tab. {
"title": "Hold z or / for control",
"rules": [
{
"description": "Hold z for control",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "z",
"modifiers": {
"optional": [
"any"
]
}
},
"to_if_alone": [
{
"key_code": "left_control"
}
]
}
]
},
{
"description": "Hold / for control",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "/",
"modifiers": {
"optional": [
"any"
]
}
},
"to_if_alone": [
{
"key_code": "right_control"
}
]
}
]
}
]
}I consider it indispensable.
$ setxkbmap -option caps:ctrl_modifier
$ xcape -e 'Caps_Lock=Escape'
if that need be run multiple times (i.e. in bashrc), add a guard: pgrep xcape >/dev/null || (
setxkbmap -option caps:ctrl_modifier
xcape -e 'Caps_Lock=Escape'
)
I think this is great advice for EVERYONE, vim user or not. Someone else made this suggestion on HN some 8 years ago and I haven't looked back since.
CapsLock is essentially useless for modern computing needs, but having a No/Cancel/Quit/Esc button immediately under your left pinky is fantastic. Your brain will get used to it in a day or so, give it a try!