Last active
March 30, 2022 18:03
-
-
Save ttscoff/06c26e5859093bd008b5cc16f5bbaa22 to your computer and use it in GitHub Desktop.
Karabiner Elements hyper key with escape
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
"complex_modifications": { | |
"rules": [ | |
{ | |
"manipulators": [ | |
{ | |
"description": "Change caps_lock to command+control+option+shift. Escape if no other key used.", | |
"from": { | |
"key_code": "caps_lock", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_shift", | |
"modifiers": [ | |
"left_command", | |
"left_control", | |
"left_option" | |
] | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"key_code": "escape", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
} | |
], | |
"type": "basic" | |
} | |
] | |
} | |
] | |
}, |
This appears to be a recent regression (probably in 12.3.0). I have complex modifications like this that stopped working after upgrading. Removing the modifiers
entry is not sufficient, because it will stop recognizing the defined keycode if any other modifier is pressed.
I just ran into this after updating Karabiner-Elements to 12.3.0
I found that deleting the "modifiers" property from the "from" and "to_if_alone" directives solved the problem.
"complex_modifications": {
"rules": [
{
"manipulators": [
{
"description": "Change caps_lock to command+control+option+shift.",
"from": {
"key_code": "caps_lock"
},
"to": [
{
"key_code": "left_shift",
"modifiers": [
"left_command",
"left_control",
"left_option"
]
}
],
"to_if_alone": [
{
"key_code": "escape"
}
],
"type": "basic"
}
]
}
]
}
@bgooseman´s solution worked for me. Thanks!
@bgooseman Thanks for your solution
Thank you! That helped!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I try this I get the following Log error from Karabiner-Elements (v):
[2019-04-03 20:51:08.064] [error] [grabber] karabiner.json error:
to_if_alone
entry error:modifiers
error: json must be array or string, but is{"optional":["any"]}