1

On macOS, is there a way to have releasing Cmd (just that one key) say open Spotlight? Similar to tapping the Super key on Gnome in Linux.

On Linux, key release triggers bindings, so its no problem to bind to a modifier key like the Super key or Command key. I believe macOS binds to key presses, so this may not be possible. Unless someone has a way around that?

4
  • 2
    The shortcut is Cmd-Space to launch Spotlight. The problem with binding to a single key, especially to just the press or release, is that humans are imperfect and this will trigger all sorts of unwanted behaviors.
    – Allan
    Commented May 25, 2023 at 13:47
  • Works just fine for everyone on Linux / Gnome. Its the default even.
    – dgh
    Commented May 25, 2023 at 15:31
  • 1
    It’s not a “Linux” thing, it’s dependent on the keyboard driver and whether or not you can access the raw keyboard scan codes. You can do this on macOS - I have an app called ControllerMate that will listen for these scan codes. It’s not native to Finder (notice, I didn’t say macOS). Finder is designed for a consistent user experience and binding a release key state to a commonly used modifier keys is bound to cause issues.
    – Allan
    Commented May 25, 2023 at 15:59
  • Do you want single Cmd press to open Spotlight but Cmd+Key to act as usual? If so, it's possible with Karabiner-Elements. See my answer on a similar question apple.stackexchange.com/a/453785/484998 Commented Jun 19, 2023 at 11:08

2 Answers 2

1

On Linux, key release triggers bindings, so its no problem to bind to a modifier key like the Super key or Command key.

Keypress are ALREADY bound to KeyRelease

There’s a free utility called xev that, unfortunately can only be run in XQuartz (when I find a native app, I’ll test and post that). When running this utility, it will report the scan codes that are generated from each key press.

From a previous answer I wrote entitled How do I get the calculator button on a Microsoft Sculpt keyboard working?, we can see that the command (not specifically ⌘ Command) is bound to the release state of the key.

On macOS, is there a way to have releasing Cmd (just that one key) say open Spotlight? Similar to tapping the Super key on Gnome in Linux.

I also don’t recommend binding UI functions (i.e. Spotlight) to a single modifier. I’m not a Linux user (prefer FreeBSD) but I am familiar with it. The “super key” is a Linux convention and is usually mapped to the unused ⊞ Win on a PC keyboard or the ⌘ Command on a Mac (booted to Linux).

As macOS already has this key assigned, mapping additional functionality to it’s individual pressed state, can only cause problems.

0
-3

Sticky Keys

I think the feature you're looking for is called Sticky Keys.

From Change Keyboard settings for accessibility on Mac:

Press a set of modifier keys one at a time in sequence instead of all at once. For example, enter the key combination Option-Command-F5 by pressing each key in sequence.

By default, Sticky Keys can be enabled by pressing the Shift key five times. You can modify this as well as other parameters by clicking on the info button .

Note : You can also enable Sticky Keys by going to System Settings > Accessibility > Keyboard and enabling Sticky Keys.

2
  • 1
    This doesn't seem to be related at all to the question. Sticky keys is for when you have multiple modifiers and want to press them sequentially instead of together. The question is about using a single modifier by itself to trigger an action immediately.
    – Barmar
    Commented Oct 24, 2023 at 17:06
  • @Barmar Oh? I think I've misunderstood the question then...
    – Thinkr
    Commented Oct 25, 2023 at 8:17

You must log in to answer this question.

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