KARABINER ELEMENTS: Issue with Hyper Key Setup + Sublayers

Hi,

I am using Karabiner Elements to setup a Hyper Key + Sublayer system similar to the setup explained in a recent Raycast Video (GitHub - mxstbr/karabiner: My Karabiner Elements configuration)

The issue I have, is that while the Hyper Key works perfectly with the Sublayers, I cannot use it to directly trigger something, like “Hyper + F”.

Could anyone have a look at the JSON file and tell me what might be the issue?

Best regards
Daniel

***
 "rules": [
                    {
                        "description": "Hyper Key: Map Caps Lock to Shift-Command-Control-Option (Escape if alone)",
                        "manipulators": [
                            {
                                "description": "Map Caps Lock to Hyper Key",
                                "from": {
                                    "key_code": "caps_lock",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "key_code": "left_command",
                                        "modifiers": [
                                            "left_control",
                                            "left_option",
                                            "left_shift"
                                        ]
                                    },
                                    {
                                        "set_variable": {
                                            "name": "hyper",
                                            "value": 1
                                        }
                                    }
                                ],
                                "to_after_key_up": [
                                    {
                                        "set_variable": {
                                            "name": "hyper",
                                            "value": 0
                                        }
                                    }
                                ],
                                "to_if_alone": [
                                    {
                                        "key_code": "escape"
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "Hyper Key sublayer \"r\"",
                        "manipulators": [
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_o",
                                        "type": "variable_if",
                                        "value": 0
                                    },
                                    {
                                        "name": "hyper_sublayer_b",
                                        "type": "variable_if",
                                        "value": 0
                                    },
                                    {
                                        "name": "hyper_sublayer_w",
                                        "type": "variable_if",
                                        "value": 0
                                    },
                                    {
                                        "name": "hyper_sublayer_s",
                                        "type": "variable_if",
                                        "value": 0
                                    },
                                    {
                                        "name": "hyper_sublayer_v",
                                        "type": "variable_if",
                                        "value": 0
                                    },
                                    {
                                        "name": "hyper_sublayer_open_bracket",
                                        "type": "variable_if",
                                        "value": 0
                                    },
                                    {
                                        "name": "hyper",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "Toggle Hyper sublayer r",
                                "from": {
                                    "key_code": "r",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "set_variable": {
                                            "name": "hyper_sublayer_r",
                                            "value": 1
                                        }
                                    }
                                ],
                                "to_after_key_up": [
                                    {
                                        "set_variable": {
                                            "name": "hyper_sublayer_r",
                                            "value": 0
                                        }
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/raycast/emoji-symbols/search-emoji-symbols",
                                "from": {
                                    "key_code": "e",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/raycast/emoji-symbols/search-emoji-symbols"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/raycast/system/open-camera",
                                "from": {
                                    "key_code": "k",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/raycast/system/open-camera"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/raycast/raycast-ai/ai-chat",
                                "from": {
                                    "key_code": "j",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/raycast/raycast-ai/ai-chat"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/raycast/clipboard-history/clipboard-history",
                                "from": {
                                    "key_code": "spacebar",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/raycast/clipboard-history/clipboard-history"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/raycast/navigation/search-menu-items",
                                "from": {
                                    "key_code": "m",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/raycast/navigation/search-menu-items"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/tailscale/tailscale/my-devices",
                                "from": {
                                    "key_code": "t",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/tailscale/tailscale/my-devices"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/raycast/calendar/my-schedule",
                                "from": {
                                    "key_code": "s",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/raycast/calendar/my-schedule"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/raycast/system/toggle-system-appearance",
                                "from": {
                                    "key_code": "a",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/raycast/system/toggle-system-appearance"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/raycast/system/empty-trash",
                                "from": {
                                    "key_code": "backslash",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/raycast/system/empty-trash"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/raycast/file-search/search-files",
                                "from": {
                                    "key_code": "f",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/raycast/file-search/search-files"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/damdam/paperless-ngx/index",
                                "from": {
                                    "key_code": "p",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/damdam/paperless-ngx/index"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/thomas/color-picker/pick-color",
                                "from": {
                                    "key_code": "c",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/thomas/color-picker/pick-color"
                                    }
                                ],
                                "type": "basic"
                            },
                            {
                                "conditions": [
                                    {
                                        "name": "hyper_sublayer_r",
                                        "type": "variable_if",
                                        "value": 1
                                    }
                                ],
                                "description": "open raycast://extensions/mmazzarolo/unicode-symbols/index",
                                "from": {
                                    "key_code": "u",
                                    "modifiers": {
                                        "optional": [
                                            "any"
                                        ]
                                    }
                                },
                                "to": [
                                    {
                                        "shell_command": "open raycast://extensions/mmazzarolo/unicode-symbols/index"
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
             
****