Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Last active March 30, 2022 18:03
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ttscoff/06c26e5859093bd008b5cc16f5bbaa22 to your computer and use it in GitHub Desktop.
Save ttscoff/06c26e5859093bd008b5cc16f5bbaa22 to your computer and use it in GitHub Desktop.
Karabiner Elements hyper key with escape
"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"
}
]
}
]
},
@bgoosman
Copy link

bgoosman commented Apr 25, 2019

I just ran into this after updating Karabiner-Elements to 12.3.0

@bgoosman
Copy link

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"
                            }
                        ]
                    }
                ]
            }

@flegfleg
Copy link

@bgooseman´s solution worked for me. Thanks!

@jonpdw
Copy link

jonpdw commented Aug 5, 2019

@bgooseman Thanks for your solution

@vprsnc
Copy link

vprsnc commented Mar 30, 2022

Thank you! That helped!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment