Jump to content

Unable to use CMD + Q as the toggle shortcut

Recommended Posts

I'd like to set CMD + Q as the default shortcut because I used to this shortcut for spotlight, and now I'd like to purchase Alfred and replace spotlight, unfortunately, it seems that's impossible to Alfred after tried every effort and workaround.


I understand that CMD + Space, Option + Space or Double CMD are very convenient and suggested combinations, but I've been already applied those combinations to other applications for years, so it's not my first option to change my habit.


It's really a basic requirement for me and my decision to make a change, so please, is there a workaround to figure it out? thanks a lot!

Share this post

Link to post

I would recommend against it since CMD+Q is the native hotkey to close an application in macOS and why Alfred doesn't allow it natively, but there's workaround that you can try. If you want to do it in Alfred, you can create a workflow, add a Hotkey node connected to a Run Script one that ' tell application "Alfred 3" to search ' and that should pop Alfred. However, where is the trick is to set you hotkey since Alfred wouldn't allow it in the Hotkey node, but you need to edit directly the workflow "info.plist" to set manually the hotkey that you want like:






(See the "hotstring" and "hotmod" keys)



Also, other workarounds would be to use another application that would allow to register you hotkey and send a different key combination that you could use in Alfred: Ex: tell the application that when you type "CMD+Q" it sends instead "CMD+ALT+SHIFT+SPACE" and map Alfred to "CMD+ALT+SHIFT+SPACE". I didn't tried it, but Hammerspoon, BetterTouchTool or

Karabiner may work for this


Please note that for my first idea you would need to buy Alfred to create your workflow and this is mainly a workaround and not sure this will always work, so please if you want to go this route, keep this in mind. Using another application to switch the hotkey would be a safer method if you can make it works and you could try before buying, but as noted above, I would recommend against since this is the shortcut for quitting an application on macOS, but I understand if you've been using it for many years.

Share this post

Link to post

Hi @GuiB, thank you for your reply, I used the second way as the workaround,  I wrote a script to intercept "CMD+Q" and then forward to a complex combination which applied to Alfred.


I understand where are you coming from, the reason why I insist on "CMD+Q" as the shortcut is that I was constantly pressing on "CMD+Q" incidentally which caused my work lost for many times, then I realized I must mute this shortcut to save my life, unfortunately, there isn't a way to mute but remap as other purposes, then I replaced to spotlight's shortcut just like my "CMD + W" to my email client, because this two combinations are so easy to press with just two fingers from one hand.


I saw some other applications are able to override the native "CMD + Q" as the shortcut, I don't very understand why Alfred has to set this restriction rather let user to choose from their preference, I can't image an impact if override the native "CMD + Q" from Alfred's point of view for now. 

Share this post

Link to post

@Neeson, yes I understand, I just wanted to make sure you knew it... I've also seen people tried to block the hotkey (remap to nothing) so it doesn't close the application by accident.


As to why Alfred doesn't allow it, you can read @Andrew's post here to have a better understanding:


Share this post

Link to post

Hmm... I have a better understanding now, and I think I'll try out your first approach as I think it's the ideal workaround just force Alfred to use the reserved key without any another scripts or applications.


Thanks a ton again!

Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...