Skip to content

Instantly share code, notes, and snippets.

@KostyaLocal
Forked from knutov/CmdShiftLanguages.json
Last active February 15, 2020 17:57
Show Gist options
  • Save KostyaLocal/36bdfe6feb21ca5c789b2aa24c23c9bf to your computer and use it in GitHub Desktop.
Save KostyaLocal/36bdfe6feb21ca5c789b2aa24c23c9bf to your computer and use it in GitHub Desktop.
{
"title": "Language toggler",
"rules": [
{
"description": "Left_Shift+Left_Control language toggle (en->ru->en...)",
"manipulators": [
{
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "en"
}
]
}
],
"type": "basic",
"from": {
"key_code": "left_shift",
"modifiers": {
"mandatory": [
"left_control"
]
}
},
"to_if_alone": [
{
"select_input_source": {
"language": "ru"
}
}
]
},
{
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "ru"
}
]
}
],
"type": "basic",
"from": {
"key_code": "left_shift",
"modifiers": {
"mandatory": [
"left_control"
]
}
},
"to_if_alone": [
{
"select_input_source": {
"language": "en"
}
}
]
}
]
},
{
"description": "Right_Shift+Right_Control language toggle (en->ru->en...)",
"manipulators": [
{
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "en"
}
]
}
],
"type": "basic",
"from": {
"key_code": "right_shift",
"modifiers": {
"mandatory": [
"right_control"
]
}
},
"to_if_alone": [
{
"select_input_source": {
"language": "ru"
}
}
]
},
{
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "ru"
}
]
}
],
"type": "basic",
"from": {
"key_code": "right_shift",
"modifiers": {
"mandatory": [
"right_control"
]
}
},
"to_if_alone": [
{
"select_input_source": {
"language": "en"
}
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment