Skip to content

Instantly share code, notes, and snippets.

@kytta
Created June 27, 2020 12:14
Show Gist options
  • Save kytta/17b828411158e1a9f62f4d5c72e532a4 to your computer and use it in GitHub Desktop.
Save kytta/17b828411158e1a9f62f4d5c72e532a4 to your computer and use it in GitHub Desktop.
Karabiner rule that switches to MigrantTastatur on Caps and to Russian on Shift-Caps
{
"title": "Sitnik-style Source Switching",
"rules": [
{
"description": "Caps Lock to en, Shift+Caps Lock to ru",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"mandatory": [
"shift"
]
}
},
"to": [
{
"select_input_source": {
"input_source_id": "^com\\.apple\\.keylayout\\.Russian$"
}
}
],
"type": "basic"
},
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"select_input_source": {
"input_source_id": "ru.karamoff.keyboardlayout.migranttastatur"
}
}
],
"type": "basic"
}
]
}
]
}
@kytta
Copy link
Author

kytta commented Jun 27, 2020

Inspired by @ai

Uses MigrantTastatur as primary input source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment