# Use Xcode Source Extensions with Key Bindings

Save time by associating a keyboard shortcut with the extension command in <kbd>Xcode</kbd> > <kbd>Preferences...</kbd> > <kbd>Key Bindings</kbd> menu. 

In my example, I defined short `⌃⇧D` for the primary command of extension [SwiftPlantUML](https://github.com/MarcoEidinger/SwiftPlantUML-Xcode-Extension).

*Note*:  You should choose a shortcut that does not conflict with the default binding.

![Screen Shot 2022-01-24 at 9.46.34 AM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1643046602824/eqmc6HvaW.png)

My shortcut allows me to quickly generate a class diagram for the currently selected source code.

![Use SwiftPlantUML in Xcode with key binding](https://cdn.hashnode.com/res/hashnode/image/upload/v1643046527955/0Si1zudLp0.gif)

Source editor extensions can read and modify the contents of a source file and read and modify the current text selection within the editor. More cool extensions are listed in the GitHub repository [awesome-xcode-extensions](https://github.com/theswiftdev/awesome-xcode-extensions).
