How to add a Keyboard Shortcut to the plugin (+v13)

Notice here that we can add keyboard shortcuts to the plugins.

Where can we find info about it?
How is Adobe XD going to handle when multiple plugins want the same shortcut?

Right now there’s no collision detection on shortcuts—that will be addressed in a future release after MAX.

We’ll be updating the documentation on how you can use keyboard shortcuts soon.

There is collision detection in the XD 13 build, just not any nice way of resolving conflicts. If your plugin’s shortcut conflicts with a built-in XD command, the plugins shortcut is simply ignored. If your plugin’s shortcut conflicts with another plugin, one of the two will be ignored. You’ll get a warning in the Developer Console but there is currently no UI shown to users when installing plugins that have these problems.

Any updates on the new docs @peterflynn?

Check out https://github.com/AdobeXD/plugin-docs/blob/master/reference/structure/manifest.md – there’s more info about keyboard shortcuts there now.

3 Likes

Is it possible to determine which of the plugins will be ignored? Is it the last installed or first installed? If we know the order the user could swap the install order to enable the shortcuts for the plugin they want to have shortcuts for.

Is there a way someone can manually add a keyboard shortcut on Windows?

Currently, it’s not possible, at least on developer’s end, to determine which one will be ignored. Uninstalling and reinstalling in a different order won’t change which shortcut is ignored. Probably the best instruction to give user is to disable one of the plugins in the Plugin Manager.

Not sure if I understand what you mean by “manually add a keyboard shortcut on Windows”? If users open the plugin folder and modify the manifests, I guess that could be one way of manually adding and deleting keyboard shortcuts.

While users modifying the manifest manually is certainly possible, it’s also something we want to actively discourage. Although JSON isn’t a complex format, the syntax is still rigid enough that a user could end up with a broken plugin that is unable to load. I’m also not sure how XD would handle that situation long term (can XD uninstall said broken plugin? Can it overwrite it?)

I suspect that long term the only way around this is to allow users to override plugin shortcuts from within XD. That’s something we want to do, and we’re collecting the analytics necessary to support our decisions there, but I don’t have any hard information on when support might be added.

Whatever overrides are supported would likely be in XD proper, so I would definitely suggest voting on XD’s uservoice for keyboard shortcut customization: https://adobexd.uservoice.com/forums/353007-adobe-xd-feature-requests/suggestions/12929127-customize-keyboard-shortcuts

2 Likes

FYI There’s a unofficial google doc that has a list of existing shortcuts here,

2 Likes

Are keyboard shortcuts case sensitive? I received an email they aren’t working.

Is:

“mac”: “Cmd+Shift+b”

different than

“mac”: “Cmd+Shift+B”

different than

“mac”: “cmd+shift+b”

Or is it conflicting with an existing keyboard shortcut?

Note: that is not the shortcut I’m using in my plugin

Suggestion: Add a note in the developer console when keyboard shortcuts conflict

it’s possible your keyboard shortcut does not work when another plugin uses the same shortcut. We are working on a solution to resolve conflict in the future.

2 Likes

Any estimate on this feature?

Could you convert this to a feature request if that’s what this post is intended to be? Once done, we will review this!

2 Likes