tmandry/AXSwift

Switching between different apps, focusedUIElementChanged will not trigger

Opened this issue · 2 comments

In the same App, press tab to switch focus, focusedUIElementChanged will be triggered.

But when switching between different apps, focusedUIElementChanged will not trigger. I think when switching to a different app, the focusedUIElement changes, then focusedUIElementChanged should be triggered.

for example:

  1. Open System Preferences
  2. Focus on the search box in the upper right corner
  3. Open https://www.google.com/ with Chrome browser
  4. Focus on the Google search box
  5. Switch to System Preferences
  6. After switching to Chrome

We will find that when the two applications are switched, focusedUIElementChanged does not trigger

@tmandry
Can I trigger focusedUIElementChanged after switching apps? Or provide other solutions. Thank you!

AXSwift is intended to be a thin wrapper around the system accessibility APIs and expose their exact behavior, so that type of thing would best be implemented by a layer on top of this library.