macosmacos-mojavekarabiner

Karabiner-Elements map a key to a combination keys


I'm new to Karabiner. As I understand it this program can change the keyboard mapping. I understand and able to use the "Simple modification" "From key" "To key".

But If I want to remap my Home button to CTRL+LEFT_ARROW how do I do that?

Currently on MacOs Mojave


Solution

  • Open ~/.config/karabiner/karabiner.json Edit that file, from the root level > "profiles" > "complex_modifications" > under parameters:{ ... }, add:

    "rules": [
                        {
                            "description": "Home to Control Left",
                            "manipulators": [
                                {
                                    "from": {
                                        "key_code": "home"
                                    },
                                    "to": [
                                        {
                                            "key_code": "left_arrow",
                                            "modifiers": "control"
                                        }
                                    ],
                                    "type": "basic"
                                }
                            ]
                        },
                        {
                            "description": "End to Control Right",
                            "manipulators": [
                                {
                                    "from": {
                                        "key_code": "end"
                                    },
                                    "to": [
                                        {
                                            "key_code": "right_arrow",
                                            "modifiers": "control"
                                        }
                                    ],
                                    "type": "basic"
                                }
                            ]
                        }
                    ]
    

    Please note that, this will map: