Skip to content

Instantly share code, notes, and snippets.

@kilsey
Last active January 24, 2019 18:31
Show Gist options
  • Save kilsey/abdfc6cba9e769c8ebb5a509fb259b4f to your computer and use it in GitHub Desktop.
Save kilsey/abdfc6cba9e769c8ebb5a509fb259b4f to your computer and use it in GitHub Desktop.
JSON file for the complex modification of Karabiner Elements, visit karabiner://karabiner/assets/complex_modifications/import?url=https://gist.github.com/kilsey/abdfc6cba9e769c8ebb5a509fb259b4f to import
{
"title": "Change caps_lock key (rev 2)",
"rules": [
{
"description": "Change caps_lock key to command+control+option. (Post escape key when pressed alone)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_option",
"modifiers": [
"left_command",
"left_control"
]
}
],
"to_if_alone": [
{
"key_code": "escape"
}
]
}
]
},
{
"description": "Change caps_lock key to command+control+option+shift. (Post f19 key when pressed alone)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_shift",
"modifiers": [
"left_command",
"left_control",
"left_option"
]
}
],
"to_if_alone": [
{
"key_code": "f19"
}
]
}
]
},
{
"description": "Change caps_lock key to command+control+option+shift. (Use shift+caps_lock as caps_lock)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"mandatory": [
"shift"
],
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "caps_lock"
}
]
},
{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_shift",
"modifiers": [
"left_command",
"left_control",
"left_option"
]
}
]
}
]
},
{
"description": "Change caps_lock to control if pressed with other keys, to escape if pressed alone.",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "escape"
}
]
}
]
},
{
"description": "Change caps_lock to control if pressed with other keys. (rev 2)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"to_if_alone": [
{
"key_code": "caps_lock",
"hold_down_milliseconds": 500
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment