Created
August 27, 2025 18:03
-
-
Save dreikanter/74a97b972035f8114ad68a52bce17e13 to your computer and use it in GitHub Desktop.
Karabinier-Elements idempotent hotkeys configuration for switching between two keyboard layouts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "Use idempotent hotkeys to switch between two keyboard layouts", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "1", | |
"modifiers": { | |
"mandatory": ["left_command", "left_option"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "1", | |
"modifiers": ["left_command", "left_option"] | |
} | |
], | |
"to_if_alone": [{ "select_input_source": { "input_source_id": "english" } }], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "2", | |
"modifiers": { | |
"mandatory": ["left_command", "left_option"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "2", | |
"modifiers": ["left_command", "left_option"] | |
} | |
], | |
"to_if_alone": [{ "select_input_source": { "input_source_id": "russian" } }], | |
"type": "basic" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to install:
How to customize keyboard layouts:
input_source_id
values for your installed keyboard layouts using im-select tool.english
andrussian
in the configuration above with case-sensitive substring (or a regular expression) for each keyboard layout id. For instance, just use "english" fororg.sil.ukelele.keyboardlayout.english-custom-layout
.References: