Skip to content

Instantly share code, notes, and snippets.

@maxim-uvarov
Created November 25, 2017 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxim-uvarov/f9d06bffe414b569730a6a94d95b1ea4 to your computer and use it in GitHub Desktop.
Save maxim-uvarov/f9d06bffe414b569730a6a94d95b1ea4 to your computer and use it in GitHub Desktop.
{
"title": "select_input_source example (available since Karabiner-Elements 11.1.9)",
"rules": [
{
"description": "Change input source to U.S. by left_command, RussianWin by right_command. (available since Karabiner-Elements 11.1.9)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_command"
}
],
"to_if_alone": [
{
"select_input_source": {
"input_source_id": "^com\\.apple\\.keylayout\\.US$"
}
}
]
},
{
"type": "basic",
"from": {
"key_code": "right_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_command"
}
],
"to_if_alone": [
{
"select_input_source": {
"input_source_id": "^org\\.sil\\.ukelele\\.keyboardlayout\\.ukeleruhash\\.russian\\-pc\\-hash$"
}
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment