Last active
March 8, 2023 14:41
-
-
Save dfendr/7e087d478caa3fcd83ba2f34763562b9 to your computer and use it in GitHub Desktop.
Vim Keyboard configurations to map Caps as Esc when tapped, ctrl when held. macOS uses custom-capslock.json with Karabiner Elements, and Linux uses keyboard.conf with keyd.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ids] | |
* | |
[main] | |
# Maps capslock to escape when pressed and control when held. | |
capslock = overload(control, esc) | |
# Remaps the escape key to capslock | |
esc = capslock | |
# Swap Left Alt with Left Ctrl for Compat with MacOS habits | |
leftalt = layer(control) | |
leftcontrol = layer(alt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment