Last active
November 30, 2020 22:28
-
-
Save dstd/550636f152f8d1894e70e516b4d2590d to your computer and use it in GitHub Desktop.
Input language switching mods for 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":"Input source change", | |
"rules": [ | |
{ | |
"description": "If pressed alone, CmdL for English, CmdR for Russian", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "left_command", | |
"modifiers": {"optional": ["any"]} | |
}, | |
"to": { | |
"key_code": "left_command" | |
}, | |
"to_if_alone": [ | |
{"select_input_source": {"language": "en"}} | |
], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "right_command", | |
"modifiers": {"optional": ["any"]} | |
}, | |
"to": { | |
"key_code": "right_command" | |
}, | |
"to_if_alone": [ | |
{"select_input_source": {"language": "ru"}} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Swap input source while CapsLock being held", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{"type": "input_source_if", "input_sources": [{"language": "en"}]} | |
], | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": {"optional": ["any"]} | |
}, | |
"to": [ | |
{"select_input_source": {"language": "ru"}} | |
], | |
"to_after_key_up": [ | |
{"select_input_source": {"language": "en"}} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{"type": "input_source_if", "input_sources": [{"language": "ru"}]} | |
], | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": {"optional": ["any"]} | |
}, | |
"to": [ | |
{"select_input_source": {"language": "en"}} | |
], | |
"to_after_key_up": [ | |
{"select_input_source": {"language": "ru"}} | |
], | |
"type": "basic" | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment