How to set a Keyboard Shortcut for a Photoshop UXP plugin?

Hello!
Is it possible to set a keyboard shortcut in a Photoshop plugin? I’ve seen some threads about it and some documentation mentioning UXP keyboard shortcuts for Adobe XD and thought it might work the same in manifest.json, but it doesn’t.

    {
      "type": "command",
      "id": "my_function",
      "label": {
        "default": "My Function"
      },
      "shortcut": {
        "mac": "Cmd+Shift+P",
        "win": "Ctrl+Shift+P"
      }
    }

Thank you!

Not yet possible. At least if you consider only the sane ways :smiley:

Thank you for your reply.

Any updates on this, in the past for traditional extendscript, I added shortcuts via the shortcut menu, so they aren’t hardcoded into the script .

However with the UXP plugins it would seem that keyboard shortcut menu only goes to the top level of the plugin menu…not down into the commands level (see screenshot attached)

1 Like

Yes, I’m very much hoping this gets implemented soon. Or that the developers have it on their timeline:

Any idea when this will be available? With CEP I was able to assign a hotkey to an action that fired an extendscript event. Is there any similar method we could use with UXP?

function sendEvent(type) {
    new ExternalObject('lib:\PlugPlugExternalObject');
    var event = new CSXSEvent();
    event.type = type;
    event.dispatch();
}

sendEvent('hotkey-process');
1 Like