AXSwift icon indicating copy to clipboard operation
AXSwift copied to clipboard

Switching between different apps, focusedUIElementChanged will not trigger

Open GanZhiXiong opened this issue 3 years ago • 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

GanZhiXiong avatar Aug 24 '22 17:08 GanZhiXiong

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

GanZhiXiong avatar Aug 25 '22 14:08 GanZhiXiong

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.

tmandry avatar Aug 27 '22 03:08 tmandry