3

It would be awesome if the caps key could change the numbers to symbols as well. For instance, with caps on, it would be nice if pressing "4" would produce "$". Is there an easy way to do this on mac?

Thanks!

EDIT: Is there a way to do it with this command "setxkbmap"? Or from the command line somehow?

  • Keyboard Maestro should be able to do this. – Talos Potential Nov 29 '18 at 4:42
2

Karabiner app should do that.

You can change the caps lock key to another key. ()

Karabiner-Elements

Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra or later.

Works with:

macOS Mojave (10.14)
macOS High Sierra (10.13)
macOS Sierra (10.12)
  • Ok I'm working on writing a complex_modification for karabiner. I'll post it here if successful. Thanks for the help! – David Nov 29 '18 at 20:28
1

Figured it out with karabiner. Switched all numbers to their symbols for caps. I'm probably gonna switch the symbols as well as the numbers at some point. Thanks to buscar!

EDIT: Formatting

{
  "title": "Caps Lock To Shift Lock",
  "rules": [
     {
        "description": "Change caps lock to shift lock",
        "manipulators": [
            {
                "type": "basic",
                "from": {
                    "key_code": "caps_lock",
                    "modifiers": {
                        "optional": [
                            "any"
                        ]
                    }
                },
                "to": [
                    {
                        "set_variable": {
                            "name": "shift_lock",
                            "value": 1
                        }
                    },
                    {
                        "key_code": "caps_lock"
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 0
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "key_code": "caps_lock",
                    "modifiers": {
                        "optional": [
                            "any"
                        ]
                    }
                },
                "to": [
                    {
                        "set_variable": {
                            "name": "shift_lock",
                            "value": 0
                        }
                    },
                    {
                        "key_code": "caps_lock"
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            },
            {
                "description": " => shift-1/!",
                "type": "basic",
                "from": {
                    "key_code": "1",
                    "modifiers": {
                         "optional": [
                            "any"
                         ]
                    }
                },
                "to": [
                    {
                        "key_code": "1",
                        "modifiers": [
                            "shift"
                        ]
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "key_code": "2",
                    "modifiers": {
                        "optional": [
                            "any"
                         ]
                    }
                },
                "to": [
                    {
                        "key_code": "2",
                        "modifiers": [
                            "shift"
                        ]
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "key_code": "3",
                    "modifiers": {
                        "optional": [
                            "any"
                         ]
                    }
                },
                "to": [
                    {
                        "key_code": "3",
                        "modifiers": [
                            "shift"
                        ]
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "key_code": "4",
                    "modifiers": {
                        "optional": [
                            "any"
                         ]
                    }
                },
                "to": [
                    {
                        "key_code": "4",
                        "modifiers": [
                            "shift"
                        ]
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "key_code": "5",
                    "modifiers": {
                        "optional": [
                            "any"
                         ]
                    }
                },
                "to": [
                    {
                        "key_code": "5",
                        "modifiers": [
                            "shift"
                        ]
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "key_code": "6",
                    "modifiers": {
                        "optional": [
                            "any"
                         ]
                    }
                },
                "to": [
                    {
                        "key_code": "6",
                        "modifiers": [
                            "shift"
                        ]
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "key_code": "7",
                    "modifiers": {
                        "optional": [
                            "any"
                         ]
                    }
                },
                "to": [
                    {
                        "key_code": "7",
                        "modifiers": [
                            "shift"
                        ]
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "key_code": "8",
                    "modifiers": {
                        "optional": [
                            "any"
                         ]
                    }
                },
                "to": [
                    {
                        "key_code": "8",
                        "modifiers": [
                            "shift"
                        ]
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "key_code": "9",
                    "modifiers": {
                        "optional": [
                            "any"
                         ]
                    }
                },
                "to": [
                    {
                        "key_code": "9",
                        "modifiers": [
                            "shift"
                        ]
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            },
            {
                "type": "basic",
                "from": {
                    "key_code": "0",
                    "modifiers": {
                        "optional": [
                            "any"
                         ]
                    }
                },
                "to": [
                    {
                        "key_code": "0",
                        "modifiers": [
                            "shift"
                        ]
                    }
                ],
                "conditions": [
                    {
                        "type": "variable_if",
                        "name": "shift_lock",
                        "value": 1
                    }
                ]
            }
        ]
     }
  ]
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .