Created
March 20, 2019 14:09
-
-
Save jakebathman/aab24444249dc19b4a00fa493a7d2aff to your computer and use it in GitHub Desktop.
Karabiner rule for double-press left shift -> caps lock
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
{ | |
"description": "Double left shift to caps_lock", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "caps_lock" | |
} | |
], | |
"conditions": [ | |
{ | |
"type": "variable_if", | |
"name": "left_shift pressed", | |
"value": 1 | |
} | |
] | |
}, | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_shift", | |
"modifiers": { | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "left_shift pressed", | |
"value": 1 | |
} | |
}, | |
{ | |
"key_code": "left_shift" | |
} | |
], | |
"to_delayed_action": { | |
"to_if_invoked": [ | |
{ | |
"set_variable": { | |
"name": "left_shift pressed", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_canceled": [ | |
{ | |
"set_variable": { | |
"name": "left_shift pressed", | |
"value": 0 | |
} | |
} | |
] | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment