Created
May 29, 2021 20:39
-
-
Save llivejo/684347b40ff88a77781a5ec21add7aa2 to your computer and use it in GitHub Desktop.
CapsLock switch to EN, Shift-CapsLock to RU - with Karabiner Elements in MacOS
This file contains 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": "[Shift-]Capslock changes to correct layout", | |
"rules": [ | |
{ | |
"description": "Capslock to EN if in RU", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"type": "input_source_if", | |
"input_sources": [ | |
{ | |
"language": "ru" | |
} | |
] | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"optional": [ | |
"caps_lock" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"select_input_source": { | |
"language": "en" | |
} | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Disable Capslock if already in EN", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"type": "input_source_if", | |
"input_sources": [ | |
{ | |
"language": "en" | |
} | |
] | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"optional": [ | |
"caps_lock" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "out" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Shift-Capslock to RU if in EN", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"type": "input_source_if", | |
"input_sources": [ | |
{ | |
"language": "en" | |
} | |
] | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"select_input_source": { | |
"language": "ru" | |
} | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"description": "Disable Shift-Capslock if already in RU", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"type": "input_source_if", | |
"input_sources": [ | |
{ | |
"language": "ru" | |
} | |
] | |
} | |
], | |
"type": "basic", | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"mandatory": [ | |
"left_shift" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "out" | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment