So I recorded an action with assigned keyboard shortcut which creates a new document. Restarted Photoshop, pressed the shortcut and document was created.
Now I do pretty much the same from the plugin:
- Start recording an action
- Do something on a plugin to add a step to action
- Stop recording
- Close all plugin panels
- Restart Photoshop
- Press the shortcut
- Nothing happens
Two ways to trigger the recorded action:
- You need to actually open any panel of the plugin and even click on it for shortcut to start working
- Open actions panel and run the action with a mouse click
I maybe would expect such behavior if my plugin manifest didn’t have:
"loadEvent": "startup"
But even with this flag shortcut doesn’t work
It just started working 
I left it alone for a while and then got back, restarted Ps and it works. Not sure what happened or what conditions caused it to not work as expected. Marking for now as solved and will get back if I encounter misbehaviour again
OK, so today I experienced again the same thing, when after Ps startup shortcut doesn’t work 
I wonder if this is related to the fact that you can’t PLAY actions that have “Do something on a plugin to add a step to action” recorded into the action from another UXP plugin, either???
In my case, that’s not it. My recorded action (from the plugin) contains a single step, which opens a dialog.
Why is that any different than any other action recorded from a UXP plugin button click?
I’m wrong again. Just assigned Shift+CTRL+F12 to play one of my actions with steps recorded from button clicks from a UXP plugin. No errors. So, maybe opening UXP dialogs is the issue.
I tried just adding a console.log()
to the handler, and it’s not triggering until I click on a panel
BTW, did you actually close all the panels and restart Ps to test this?
I did not close all the panels and restart Ps to test this. I just made a keyboard shortcut for an action that included UXP button clicks and it worked.
It works, because you already interacted with the plugin after opening the Ps. After restart, when panels are closed, it doesn’t, even if there’s "loadEvent": "startup"
and plugin is loaded
I closed the panel and restarted Ps and the keyboard shortcut still worked to run my action. I thought that as long as the necessary plugin was installed, actions that had steps recorded from that plugin would work, and that seems to be the case here. Even when the plugin was closed and not even visible in my workspace, the action ran with the keyboard shortcut.
That’s what I had briefly, but later it stopped working again 