Neeson Posted May 6, 2018 Share Posted May 6, 2018 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! Link to comment
GuiB Posted May 6, 2018 Share Posted May 6, 2018 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: Quote <dict> <key>action</key> <integer>0</integer> <key>argument</key> <integer>0</integer> <key>focusedappvariable</key> <false/> <key>focusedappvariablename</key> <string></string> <key>hotkey</key> <integer>12</integer> <key>hotmod</key> <integer>1048840</integer> <key>hotstring</key> <string>Q</string> <key>leftcursor</key> <false/> <key>modsmode</key> <integer>2</integer> <key>relatedAppsMode</key> <integer>0</integer> </dict> (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. Link to comment
Neeson Posted May 6, 2018 Author Share Posted May 6, 2018 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. Link to comment
GuiB Posted May 6, 2018 Share Posted May 6, 2018 @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: Neeson 1 Link to comment
Neeson Posted May 7, 2018 Author Share Posted May 7, 2018 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! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now