Created
June 5, 2024 19:52
-
-
Save sxlijin/64ab2afe7e95ac06187801f4ed21c81b to your computer and use it in GitHub Desktop.
karabiner-elements rules
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
{ | |
"description": "In Terminal/VSCode, caps_lock is CTRL", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com\\.apple\\.Terminal", | |
"^com\\.googlecode\\.iterm2", | |
"^com\\.microsoft\\.VSCode" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "left_command" | |
}, | |
"to": [ | |
{ | |
"key_code": "left_control" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com\\.apple\\.Terminal", | |
"^com\\.googlecode\\.iterm2", | |
"^com\\.microsoft\\.VSCode" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "tab", | |
"modifiers": { | |
"mandatory": [ | |
"control" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "tab", | |
"modifiers": [ | |
"command" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com\\.apple\\.Terminal", | |
"^com\\.googlecode\\.iterm2", | |
"^com\\.microsoft\\.VSCode" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "tab", | |
"modifiers": { | |
"mandatory": [ | |
"control", | |
"shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "tab", | |
"modifiers": [ | |
"command", | |
"shift" | |
] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"bundle_identifiers": [ | |
"^com\\.apple\\.Terminal", | |
"^com\\.googlecode\\.iterm2", | |
"^com\\.microsoft\\.VSCode" | |
], | |
"type": "frontmost_application_if" | |
} | |
], | |
"from": { | |
"key_code": "spacebar", | |
"modifiers": { | |
"mandatory": [ | |
"control" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "spacebar", | |
"modifiers": [ | |
"command" | |
] | |
} | |
], | |
"type": "basic" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment