If you read my last blog post on creating snippets in Dreamweaver CS5, you should now know how convenient and powerful they are, especially if you continuously reuse large pieces of code. You can simplify this task down to selecting a snippet in a list. You can even further simplify this task (and almost any other task in Dreamweaver), however, down to the push of a button–and whatever button you like by creating a keyboard shortcut.
You can access keyboard shortcuts in Dreamweaver CS5 either by right-clicking from the Snippets menu…
or going to Edit > Keyboard Shortcuts…
You’ll then view the Keyboard Shortcuts window.
Keyboard Shortcuts window
Dreamweaver CS5 Keyboard Shortcuts Explained
First, to explain keyboard shortcuts: every shortcut is part of a set. The default shortcut set is called the “Dreamweaver set”. You cannot edit the Dreamweaver set at all, since it is the default, but you can duplicate this and other sets, and you can edit and delete any other set.
Thus, the first step to creating your own shortcuts would be to simply duplicate and rename the original Dreamweaver set. Using my previous post’s example, I can make my own set called “Sean’s Shortcuts” and make a keyboard shortcut for my “Exercise” snippet.
Now, every time I press CTRL+SHIFT+*, my entire exercise snippet will automatically enter my document.
So, in short:
Go to Edit > Keyboard Shortcuts…
Duplicate the original “Dreamweaver set” and rename.
In the “Commands” field, select the category and then the specific command for which you’d like to create a shortcut.
In the Press key field, press the key(s) you want to use for your shortcut.
And don’t worry if you select a shortcut that’s already taken: Dreamweaver will yell and tell you so.
You can create snippets for essentially anything in Dreamweaver. Inserting SWFs, making divs, anything you can access in the “Commands” section. I’d love to hear what functions you made shortcuts for, so please comment!
Webucator Delivers Instructor-led and Self-paced Training