Jump to content

Alfred blocks/disrupts other applications' keyboard focus


Derekasaurus

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 comment
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:

https://www.alfredapp.com/help/troubleshooting/cmd-space/

 

Cheers,

Andrew

Link to comment
Share on other sites

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 comment
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 comment
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 comment
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 comment
Share on other sites

  • 3 weeks later...

After upgrading my OS last night, Alfred lost my powerpack as well as my snippets.
At first I didn't think much of it, looked up my license key, re-entered the few snippets I have and again off I went...

 

But... the issue Derekasaurus illustrates started happening. It is a highly frustrating bug. I'm browsing comparing hotel and suddenly the primary mouse doesn't function anymore, not on the magic mouse nor on the pad. Trying to use the keyboard to navigate results in a hars "beep".

 

My workaround was going to the desktop, take a random file and edit the filename. This resolved the weird situation apparently. A temporary fix, but still frustrated as none of my google searches provided any known issue with Catalina and chrome. And tiresome as this would be necessary every 5 minutes or so.

 

By sheer luck editing more settings within Alfred, at one point I closed the application. At some point it dawned upon me that it was the longest without the annoying issue.

 

 

Link to comment
Share on other sites

@Nicolas Mertens This seems to be an isolated issue experienced by only a couple of users, likely caused by interference by a third-party.

 

As the user above you stated, You can resolve this by changing Alfred's focus to Compatibility Mode in the Preferences > Appearance > Options > Focusing: Switch from Standard Mode to Compatibility Mode. Have you done this?

 

Cheers,
Vero

Link to comment
Share on other sites

  • 7 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...