Created
July 7, 2023 22:10
-
-
Save sebastorama/da2a98a8b8c8d6532345262fd634c740 to your computer and use it in GitHub Desktop.
Caps Lock acts as another modifier, appending tmux prefix key (Ctrl+b) to some keys. For use with karabiner
This file contains hidden or 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": "Caps Lock Modifications", | |
"rules": [ | |
{ | |
"description": "Caps Lock Modifications", | |
"manipulators": [ | |
{ | |
"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": "out" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "d", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f1" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "f", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "f2" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "open_bracket", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "b", | |
"modifiers": ["left_control"] | |
}, | |
{ | |
"key_code": "open_bracket" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "return_or_enter", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "b", | |
"modifiers": ["left_control"] | |
}, | |
{ | |
"key_code": "w" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "c", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "b", | |
"modifiers": ["left_control"] | |
}, | |
{ | |
"key_code": "c" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "s", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "b", | |
"modifiers": ["left_control"] | |
}, | |
{ | |
"key_code": "s" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "m", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "b", | |
"modifiers": ["left_control"] | |
}, | |
{ | |
"key_code": "m" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "semicolon", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "b", | |
"modifiers": ["left_control"] | |
}, | |
{ | |
"key_code": "semicolon", | |
"modifiers": ["left_shift"] | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "spacebar", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "b", | |
"modifiers": ["left_control"] | |
}, | |
{ | |
"key_code": "spacebar" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "z", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "b", | |
"modifiers": ["left_control"] | |
}, | |
{ | |
"key_code": "z" | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"name": "caps_lock pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "o", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "b", | |
"modifiers": ["left_control"] | |
}, | |
{ | |
"key_code": "o" | |
} | |
], | |
"type": "basic" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment