0

Coming from linux (KDE) I was able to assign a keyboard shortcut to the meta key. I'm wondering if it's possible to do something similar with the Command key on macOS? I would like to open launchpad after a single press of the Command key ideally.

1
  • 2
    So, how would you use it for other shortcuts, like Copy and Paste? The OS acts on a keypress when the button is down, not on release. Probably easier to assign an F key to Launchpad.
    – benwiggy
    Commented Dec 10, 2022 at 17:54

1 Answer 1

4

You can do it with Karabiner-Elements using Complex Modifications.

There is no such modification in the Karabiner-Elements complex_modifications rules list so you will have to add it manually:

  1. Install and setup Karabiner-Elements.
  2. Open ~/.config/karabiner/karabiner.json.
  3. Add the following rule in profiles.complex_modifications.rules list:
{
    "description": "Open Launchpad if left_command is pressed alone.",
    "manipulators": [
        {
            "type": "basic",
            "from": {
                "key_code": "left_command",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "left_command"
                }
            ],
            "to_if_alone": [
                {
                    "shell_command": "open -a Launchpad.app"
                }
            ]
        }
    ]
}
  1. Save the changes. The rule should appear in Karabiner-Elements UI as shown in the picture below: Karabiner-Elements rule

You must log in to answer this question.

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