How to turn on caps lock with hyper key set up?

Many blog posts and articles instruct how you can turn your caps lock key into a 'hyper key' of Shift+Ctrl+Cmd+Alt using karabiner-elements. Here is one of the many.

The article that first introduced me to the idea also showed how to subsequently create a new command to turn on caps lock (e.g. Hyper+L would enable all caps). Now, however, after countless iterations of Google queries I can't find how to do this. I also can't find caps lock in the services menu of System Preference's keyboard settings. Thus my question:

⇒ How can I create a new keyboard shortcut for caps lock?

I am not asking how to remap the caps lock key. I am asking how to enable the caps lock function/behavior without using a caps lock key (remapped or not).


Open /Users/<you>/.config/karabiner/karabiner.json in your favourite text editor. In the section rules, add the following segment (without the first and last line, they are just to help you find it)

        "rules": [
            {
                "manipulators": [
                    {
                        "description": "Change command+l to Caps Lock",
                        "from": {
                            "key_code": "l",
                            "modifiers": [
                                "left_command"
                            ]
                        },
                        "to": [
                            {
                                "key_code": "caps_lock"
                            }
                        ],
                        "type": "basic"
                    }
                ]
            }
        ]

This uses left_command, not hyper because I'm not entirely sure if it understands the latter's keycode. But try hyper or use the event viewer to find the key code.

Then, restart karabiner.