Skip to content

Instantly share code, notes, and snippets.

@nlopin
Last active April 11, 2020 22:09
Show Gist options
  • Save nlopin/2b431d78df6d80b8ca1d74b68aa3df85 to your computer and use it in GitHub Desktop.
Save nlopin/2b431d78df6d80b8ca1d74b68aa3df85 to your computer and use it in GitHub Desktop.
Karabiner config: Left CMD → EN, right CMD → RU
{
"title": "Non-modal input language change",
"rules": [
{
"description": "Switch to RU",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
],
"type": "input_source_if"
}
],
"from": {
"key_code": "right_command"
},
"to_if_alone": [
{
"select_input_source": {
"language": "ru"
}
}
],
"type": "basic"
}
]
},
{
"description": "Switch to EN",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "ru"
}
],
"type": "input_source_if"
}
],
"from": {
"key_code": "left_command"
},
"to_if_alone": [
{
"select_input_source": {
"language": "en"
}
}
],
"type": "basic"
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment