In this blog post I will explain how you can define a keyboard shortcut to quickly trigger a Swift package command plugin in Xcode 14.
If you are unfamiliar with Swift package plugins and their recent Xcode integration, I recommend reading the following article.
Unfortunately, it is not possible to define a key binding from the Xcode preference π
I created a feedback item for Apple .. maybe this functionality will get added in the future. But there is a workaround!
A big shoutout and thanks to Martin Fiebig who explained this workaround to me π
You can bind any menu command via your Mac's System Preferences
. Select Keyboard
-> Shortcuts
-> App Shortcuts
and add a new item.
IMPORTANT: The menu title needs to be an exact match!
You will see the shortcut in Xcode once you added the app shortcut.
And here is the proof that it works π