Jump to content

Alfred blocks/disrupts other applications' keyboard focus

Recommended Posts

I have observed the following behavior on two MacBook Pro models running macOS 10.15.6 and Alfred 4.1.1.


When Alfred is running, sometimes when I switch between already running applications with a mouse click, the app I'm switching to seems to lose keyboard focus and typing any key only results in a system beep.


For example, if I'm in Microsoft Word and change my focus by clicking in a Chrome window, occasionally typing in Chrome will only cause system beeps with every keypress, but no characters appear. The only way to recover is to click away to another application (say back to Word) and then switch focus again to Chrome. I've observed this keyboard lockout behavior when switching between a variety of apps, including Chrome, Word, Firefox, Slack, etc. Also, when an application has its focus blocked/stolen in this way, the mouse cursor also fails to register mouse-over events in the affected application.


This is not a problem that happens with 100% regularity, but during a normal day I'll encounter it multiple times per hour. It happens on two laptops (one 2015 and the other 2019) regularly.


I am 100% sure Alfred is causing this problem because it happens multiple times per hour when Alfred is running in the background, and I have never observed it on the same computers when I quit Alfred. I also never observed this before upgrading to Catalina several months ago.


If there is any way to get more data from system logs or other sources, I'll be happy to try to provide them.

Link to post
Share on other sites

@Derekasaurus Alfred doesn't do anything while in the background, so won't be affecting focus in this way.


This could very well be a consequence of a hotkey conflict though. One example of this is cmd+space which is used by various features in macOS. If you also have Alfred using this hotkey combo, then both Spotlight and Alfred are trying to show at the same time, and it will leave an invisible spotlight window once Alfred is hidden which can cause all sorts of odd behaviour.


If you're using cmd+space, take a look at the 3 items on this page to disable:





Link to post
Share on other sites
Posted (edited)

Thanks for taking the time to respond, @Andrew. Alfred was using the default option+space mapping, and I changed it to control+option+command+space to see if it would make a difference. It did not.


I realize that it doesn't make intuitive sense why Alfred would be interfering with other applications getting keyboard/cursor focus, but unfortunately it's a repeatable experiment. When Alfred is running I encounter the problem I described in my original post several times an hour. Then when I quit Alfred it goes away—I've run for days sans Alfred and have never seen it. Then I start up Alfred again, and within minutes it will happening again. I've repeated this experiment on both of my Catalina MacBooks and it is consistent.


I'm sure Alfred is the cause, and even if it does nothing in the background, I suspect how it integrates with macOS is causing this issue somehow.

Edited by Derekasaurus
Link to post
Share on other sites

@Andrew +1. Having had spotlight and Alfred mapped to the same shortcut.


I was experiencing this issue as well, but mine is very regular and deterministic. The reproducing flow would be:


1. Typing in App A.

2. Toggle Alfred (option + space), finishing command

3. Dismiss Alfred

4. App A stopped responding to keyboard events (with system beep).

5. Switch to App B using mouse and activate keyboard focus on App B

6. Switch back to App A, keyboard starts working again.


Once I changed those mappings, everything starts working again.

Link to post
Share on other sites

@Derekasaurus can you email the output file from typing ?diagnostics into Alfred to our info@ address so I can take a look at any configured hotkeys?


Alfred doesn't "install" itself into macOS, the window is just a regular app window, and when at idle, will be invisible just like any other app would be. As this issue is only affecting your configuration, it's likely to be something else you have installed which indirectly causing the behaviour (possibly by interfering with Alfred).

Link to post
Share on other sites
  • 2 weeks later...
  • 2 weeks later...

Just for closure, I want to mention that since changing the the focusing mode from Standard to Compatibility, the problem has gone away.


I can make it recur by undoing that change, and I still don't have a clear understanding of the root problem, but Compatibility mode seems to do the trick.


Thank you all for your help.

Edited by Derekasaurus
Link to post
Share on other sites

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...