Blur and focus events for UXP host application


I’m looking at handling application-wide “blue” and “focus” events for the entire UXP host application (Photoshop in the case at hand).

The scenario is where the user has some other application with input focus (say, a web browser) and then clicks back into Photoshop: at this point we need to get a notification in the UXP plugin.

For the “blur” event, the scenario is the inverse, obviously enough: here the user is in Photoshop and shifts input focus away from the application by clicking on the web browser window.

check this link, it may be what you looking for. one of the event it register focus change.

Thank you, Wanokuni.

We did look at require(“photoshop”).eventNotifier() but the host never calls back when the application is activated or deactivated. We only get internal events like when the user selects a different tool.