Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Daniel-Walsh/4c5a583d25bc9191aa04ec498307df3a to your computer and use it in GitHub Desktop.
Save Daniel-Walsh/4c5a583d25bc9191aa04ec498307df3a to your computer and use it in GitHub Desktop.
A complex modification rule for Karabiner-Elements, this will change caps_lock to left_control if pressed with other keys, and change caps_lock to escape if pressed alone.
{
"description": "Change caps_lock to left_control if pressed with other keys, change caps_lock to escape if pressed alone.",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment