Settings

Theme

Ask HN: Why does macOS still lack focus stealing prevention in 2025?

5 points by joshuak 24 days ago · 8 comments · 2 min read


Been dealing with this forever and finally went down the rabbit hole to understand it properly.

  The issue: macOS lets any app steal your keyboard focus whenever it wants. Technically, apps just call [NSApp activateIgnoringOtherApps:YES] and boom - your keystrokes are going somewhere else.

  Why I care:
  - I've typed passwords into the wrong window more than once
  - Constant interruptions kill flow
  - VoiceOver users have it way worse - they lose their whole navigation context

  Here's the frustrating part: this has been solved everywhere else for ages. Windows added ForegroundLockTimeout back in XP (2001). X11 window managers have had this forever. GNOME and KDE have had settings for it for decades. There's literally a Wikipedia article about it: https://en.wikipedia.org/wiki/Focus_stealing

  Jeff Atwood nailed it back in 2007: "Stealing focus from the user is never acceptable."

  I've tried everything - defaults write tricks, Hammerspoon scripts, random third-party apps. Nothing works reliably.

  All we need is one checkbox in System Settings. Apps that want attention bounce in the Dock instead of hijacking your keyboard. That's it.

  The accessibility angle is what gets me - Apple talks a big game about accessibility, but this is a real gap. What's a 2-second annoyance for me is a 30+ second disruption for screen reader users.

  Filed feedback (FB21568202). Curious if anyone's found workarounds that actually stick.
k310 23 days ago

GIMP refuses to give the keyboard focus to a file dialog. I have to click on the dialog's window.

I have found no solution, and the customary ENTER key does not work until I click on the save dialog,nor file name, nada, and this all used to work smoothly. Search turns up no other cases of this.

al_borland 24 days ago

WebEx is very guilty of this any time sharing is invoked or changes hands.

I usually just curse at it and call it names.

  • joshuakOP 24 days ago

    This is the problem I suspect. I think it has a negative impact on tons of users but people just curse and move on.

    • al_borland 24 days ago

      One of the big problems for me is that my company installs all kind of nonsense for security that makes the whole system behave strangely. For example, when I click on a window to activate it, it will often jump across the screen. In over 20 years on the Mac, I’ve never experienced this on my personal system. However, it happens almost every day at work. The hard drive on my desktop also randomly disappears and reappears, but only on the work Mac, and it’s happened constantly, everyday, for 6 years. It’s probably JAMF, but I can’t do anything about it. There is a bit of learned helplessness when dealing with my work Mac.

      Most of my focus issues are at work, so I have no idea what is a macOS issue and what is an issue with the stuff the company installed.

      On my personal Mac and phone, I submit feedback to Apple all the time when things annoy me, since those issues are more clear cut.

bigyabai 24 days ago

I'm not sure, but if you've reached the point that you're sending AI-generated pleas to the community then you might as well switch to Linux or Windows.

  • joshuakOP 24 days ago

    Thanks for your "not sure" comment. Very helpful. Perhaps I'm mistaken but I thought the formatting would make it more legible and scannable. I can see why that might come across as AI generated, but it isn't. I did use AI to reduce the formatting just now though. Do you find this more or less objectionable?

daviddever23box 24 days ago

Windows may not steal your keyboard focus, but it will block the very thing you're trying to do with useless dialogue boxes.

Notifications should be non-blocking. ALWAYS.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection