Skip to content

Instantly share code, notes, and snippets.

@vadimreutskiy
Created February 22, 2023 09:20
Show Gist options
  • Save vadimreutskiy/6ceef8f22e6c43f3fcf3456b74a32c52 to your computer and use it in GitHub Desktop.
Save vadimreutskiy/6ceef8f22e6c43f3fcf3456b74a32c52 to your computer and use it in GitHub Desktop.
Karabiner elements configuration for changing input layout by pressing CMD keys
{
"title": "Change keyboard layout on cmd press",
"rules": [
{
"description": "Change input source to En (ABC) left_command; Ru by right_command.",
"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.ABC$"
}
}
]
},
{
"type": "basic",
"from": {
"key_code": "right_command",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_command"
}
],
"to_if_alone": [
{
"select_input_source": {
"input_source_id": "^com.apple.keylayout.RussianWin$"
}
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment