documents/keyboards/mac-karabiner.md

Karabiner

Location: ~/.config/karabiner/karabiner.json

{
    "title": "Dominick",
    "rules": [
        {
            "description": "CapsFN Media",
            "manipulators": [
                {
                    "from": {
                        "key_code": "comma",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "volume_decrement"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "period",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "volume_increment"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "m",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "mute"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "slash",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "play_or_pause"
                        }
                    ],
                    "type": "basic"
                }
            ]
        },
        {
            "description": "CapsFN Tab for caps_lock",
            "manipulators": [
                {
                    "from": {
                        "key_code": "tab",
                        "modifiers": {
                            "mandatory": [
                                "caps_lock",
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "caps_lock"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "tab",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "caps_lock"
                        }
                    ],
                    "type": "basic"
                }
            ]
        },
        {
            "description": "CapsFN brackets",
            "manipulators": [
                {
                    "from": {
                        "key_code": "u",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "open_bracket"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "i",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "close_bracket"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "j",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "open_bracket",
                            "modifiers": [
                                "left_shift"
                            ]
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "k",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "close_bracket",
                            "modifiers": [
                                "left_shift"
                            ]
                        }
                    ],
                    "type": "basic"
                }
            ]
        },
        {
            "description": "CapsFN Misc",
            "manipulators": [
                {
                    "from": {
                        "key_code": "spacebar",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "return_or_enter"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "a",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        { "key_code": "c" },
                        { "key_code": "a" },
                        { "key_code": "n" },
                        { "key_code": "n" },
                        { "key_code": "o" },
                        { "key_code": "n" },
                        { "key_code": "return_or_enter" }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "g",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        { "key_code": "1" },
                        { "key_code": "5" },
                        { "key_code": "2" },
                        { "key_code": "4" },
                        { "key_code": "3" },
                        { "key_code": "4" },
                        { "key_code": "a", "modifiers": ["left_shift"] },
                        { "key_code": "a" },
                        { "key_code": "1", "modifiers": ["left_shift"] },
                        { "key_code": "1", "modifiers": ["left_shift"] },
                        { "key_code": "return_or_enter" }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "v",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        { "key_code": "1" },
                        { "key_code": "5" },
                        { "key_code": "2" },
                        { "key_code": "4" },
                        { "key_code": "3" },
                        { "key_code": "4" },
                        { "key_code": "d", "modifiers": ["left_shift"] },
                        { "key_code": "d" },
                        { "key_code": "return_or_enter" }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "b",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        { "key_code": "b", "modifiers": ["left_shift"] },
                        { "key_code": "b" },
                        { "key_code": "1" },
                        { "key_code": "5" },
                        { "key_code": "2" },
                        { "key_code": "4" },
                        { "key_code": "3" },
                        { "key_code": "4" },
                        { "key_code": "return_or_enter" }
                    ],
                    "type": "basic"
                }
            ]
        },
        {
            "description": "CapsFN arrow",
            "manipulators": [
                {
                    "from": {
                        "key_code": "k",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "up_arrow"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "h",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "left_arrow"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "j",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "down_arrow"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "l",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "right_arrow"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "w",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "up_arrow"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "a",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "left_arrow"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "s",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "down_arrow"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "d",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "right_arrow"
                        }
                    ],
                    "type": "basic"
                }
            ]
        },
        {
            "description": "Grave Escape",
            "manipulators": [
                {
                    "from": {
                        "key_code": "escape",
                        "modifiers": {
                            "mandatory": [
                                "left_command"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "grave_accent_and_tilde",
                            "modifiers": [ "left_command" ]
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "grave_accent_and_tilde",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "escape"
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "escape",
                        "modifiers": {
                            "mandatory": [
                                "left_shift"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "grave_accent_and_tilde",
                            "modifiers": [
                                "left_shift"
                            ]
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "escape",
                        "modifiers": {
                            "mandatory": [
                                "right_shift"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "grave_accent_and_tilde",
                            "modifiers": [
                                "right_shift"
                            ]
                        }
                    ],
                    "type": "basic"
                },
                {
                    "from": {
                        "key_code": "escape",
                        "modifiers": {
                            "mandatory": [
                                "left_command",
                                "left_control",
                                "left_shift",
                                "left_option"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "grave_accent_and_tilde"
                        }
                    ],
                    "type": "basic"
                }
            ]
        },
        {
            "manipulators": [
                {
                    "description": "Change caps_lock to command+control+option+shift.",
                    "from": {
                        "key_code": "caps_lock",
                        "modifiers": {
                            "optional": [
                                "any"
                            ]
                        }
                    },
                    "to": [
                        {
                            "key_code": "left_shift",
                            "modifiers": [
                                "left_command",
                                "left_control",
                                "left_option"
                            ]
                        }
                    ],
                    "type": "basic"
                }
            ]
        }
    ]
}