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:
- Open System Preferences
- Focus on the search box in the upper right corner
- Open https://www.google.com/ with Chrome browser
- Focus on the Google search box
- Switch to System Preferences
- After switching to Chrome
We will find that when the two applications are switched, focusedUIElementChanged does not trigger