Skip to content

Instantly share code, notes, and snippets.

@ptzn
Created January 2, 2018 12:14
Show Gist options
  • Save ptzn/37b3989ceea60cf644d686e3a5850360 to your computer and use it in GitHub Desktop.
Save ptzn/37b3989ceea60cf644d686e3a5850360 to your computer and use it in GitHub Desktop.
remapping cmd+space to right command using karabiner-elements
// REMAPPING CMD+SPACE TO RIGHT COMMAND USING https://github.com/tekezo/Karabiner-Elements
// Put following code into rules section into ~/.config/karabiner/karabiner.json file
// "profiles": [
// ...
"rules": [
{
"description": "RightCommand to Switch Input Source",
"manipulators": [
{
"conditions": [
{
"type": "input_source_if",
"input_sources": [
{
"language": "en"
}
]
}
],
"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.Russian"
}
}
]
},
{
"conditions": [
{
"type": "input_source_unless",
"input_sources": [
{
"language": "en"
}
]
}
],
"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.US"
}
}
]
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment