I would like to submit a feature request for UXP (Unified Extensibility Platform):
It would be extremely helpful if UXP could support global keyboard shortcuts, or at the very least, enable global event listening for modifier keys including Shift, Ctrl, and Alt.
Currently, these key events can only be captured when the panel has focus. It is often necessary for plugins to detect the pressed state of these modifier keys even when the panel is not focused, to implement better interaction logic and user experience.
I made my own app to do this — Spell Book.
Works in Premiere Pro, After Effects, Photoshop, Illustrator, and InDesign.
It allows to register shortcuts globally and also accounts for shortcut conflict with a host app, so it is not possible to register shortcut that is already used by a host app.
There is API for developers to add Spell Book support for their extensions.
I think it worked in XD, but did not anywhere else. Honestly, I think your best bet would be to create a custom hybrid plugin rather than waiting for Adobe, since we’ve wanted it for years, and as far as I know, UXP still does not even have a product manager person.
You should create a Hybrid Plugin instead of waiting for Adobe’s support. I’ve built one myself and it works brilliantly. The thing you need to watch out for is that since Hybrid Plugins use C/C++, they listen to all key events; you’ll have to figure out how to intercept all the keys that have been hijacked by Photoshop.