Skip to content

Instantly share code, notes, and snippets.

@pixelbreaker
Last active July 14, 2022 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pixelbreaker/5e3fb8fa95ce1133563454ec04ec3e6e to your computer and use it in GitHub Desktop.
Save pixelbreaker/5e3fb8fa95ce1133563454ec04ec3e6e to your computer and use it in GitHub Desktop.
Coding capslock symbols for Karabiner Elements complex modifications
{
"title": "Caps Lock Vim Movements (rev 2)",
"rules": [
{
"description": "CAPS › ESC, CAPS+H/J/K/L › ←↓↑→, CAPS+D/U › PG↓↑",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "down_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "up_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "h",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_arrow"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "d",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "page_down"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "u",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "page_up"
}
],
"type": "basic"
},
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 1
}
}
],
"to_after_key_up": [
{
"set_variable": {
"name": "caps_lock pressed",
"value": 0
}
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
},
{
"description": "CAPS+↩︎ › CAPS",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "return_or_enter",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "caps_lock"
}
],
"type": "basic"
}
]
},
{
"description": "CAPS+A › CAPS",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "a",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "caps_lock"
}
],
"type": "basic"
}
]
},
{
"description": "CAPS+F › Finder in ~",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"shell_command": "open ~"
}
],
"type": "basic"
}
]
},
{
"description": "Swap : for ;",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "semicolon",
"modifiers": {
"mandatory": ["shift"],
"optional": ["caps_lock"]
}
},
"to": [
{
"key_code": "semicolon"
}
]
},
{
"type": "basic",
"from": {
"key_code": "semicolon",
"modifiers": {
"optional": ["caps_lock"]
}
},
"to": [
{
"key_code": "semicolon",
"modifiers": ["left_shift"]
}
]
}
]
},
{
"description": "CAPS+Fkeys › Mac Media Keys",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f1",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "display_brightness_decrement"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f2",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "display_brightness_increment"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f3",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "mission_control"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f4",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "spotlight"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f5",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "dictation"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f7",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "rewind"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f8",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "play_or_pause"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f9",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "fastforward"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f10",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "mute"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f11",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "volume_decrement"
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "f12",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "volume_increment"
}
],
"type": "basic"
}
]
},
{
"description": "CAPS+Rhand › Coding Symbols",
"manipulators": [
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "y",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "1",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "h",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "backslash",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "n",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "7",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "7",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "9",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "u",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "open_bracket",
"modifiers": []
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "j",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "open_bracket",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "m",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "comma",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "8",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "0",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "i",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "close_bracket",
"modifiers": []
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "close_bracket",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "comma",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "period",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "o",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "4",
"modifiers": ["shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "l",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "equal_sign",
"modifiers": []
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "period",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "hyphen",
"modifiers": []
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "delete_forward",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "k",
"modifiers": ["command","shift"]
}
],
"type": "basic"
},
{
"conditions": [
{
"name": "caps_lock pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "insert",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "f5"
}
],
"type": "basic"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment