# Add a keyboard shortcut to Swift package command plugins

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.

![Screen Shot 2022-06-22 at 6.57.16 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1655907214254/FTjBhfm5C.png align="left")

If you are unfamiliar with Swift package plugins and their recent Xcode integration, I recommend reading the following article.

%[https://blog.eidinger.info/xcode-integration-of-swift-package-plugins-in-xcode-14]

Unfortunately, it is not possible to define a key binding from the Xcode preference 😔

![Missing Option in Key Bindings Xcode Preferences](https://cdn.hashnode.com/res/hashnode/image/upload/v1655909482287/IwfVFxA5L.png align="left")

![No Shortcut](https://cdn.hashnode.com/res/hashnode/image/upload/v1655907165963/1cZ15ub43.png align="left")

I created a [feedback item for Apple](https://t.co/JszRV7wHSC) .. maybe this functionality will get added in the future. But there is a workaround!

A big shoutout and thanks to [Martin Fiebig](https://twitter.com/MrtnFbg) who [explained](https://twitter.com/MrtnFbg/status/1539595686391554049?s=20&t=qDmZgwU-oP1gpghCrt2yvA) 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!

![Screen Shot 2022-06-22 at 6.56.26 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1655907192517/NMMRGj928.png align="left")

![Screen Shot 2022-06-22 at 6.56.41 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1655907202490/a3mUAL1gC.png align="left")

You will see the shortcut in Xcode once you added the app shortcut.

![Screen Shot 2022-06-22 at 6.57.16 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1655907214254/FTjBhfm5C.png align="left")

And here is the proof that it works 😊

![Demonstration](https://cdn.hashnode.com/res/hashnode/image/upload/v1655909974370/Wdl0Dz_DG.gif align="left")


