|
SYS-CON.TV Webcasts
Comments
Did you read today's front page stories & breaking news?
SYS-CON.TV
|
Top Links You Must Click On
Dreamweaver Have It Your Way
Custom keyboard shortcuts in Dreamweaver MX 2004
By: Justin Kozuch
May. 19, 2004 12:00 AM
While dialog boxes and pull-down menus are one way to insert HTML, all that extra mousing around takes time. After the tenth time you choose Insert > Image Objects > Rollover Image, your aching hand will need some relief and you'll be wondering if there's a faster way to get your work done. Fortunately, the customizable nature of Dreamweaver makes most commands just a key tap away. What Are Shortcuts? Why are shortcuts so important? Well, there are a few reasons. First, from an ease-of-use standpoint, you don't need to access a menu item (or more than one menu item) to use that feature, which makes the keyboard shortcut concept a timesaver. From an accessibility standpoint, computer users who have mobility problems and therefore cannot use a mouse effectively, benefit because less movement is required to use a keyboard shortcut than to use a mouse to perform the same task. In Macromedia Dreamweaver MX 2004, there are 199 shortcuts that can be used to accomplish almost every task imaginable, from the obvious - like creating a new file (Ctrl+N on the Windows platform, Cmd+N on the Macintosh platform) - to the shortcut used to access the Dreamweaver Help Topics (F1 on both the Windows and Macintosh platforms). However, you will notice over time that not every menu item in Dreamweaver 2004 has a shortcut assigned to it. In this article, you'll learn how to create your own shortcuts, how to share your finished shortcut set with other Web developers, and where to find useful shortcut resources. Setting Everything Up Once the Keyboard Shortcuts dialog box has opened, you will see something very similar to Image I. Since Dreamweaver MX 2004 will not allow you to edit the Macromedia Standard keyboard shortcut set through the Keyboard Shortcuts dialog box, the first thing we need to do is create a duplicate shortcut set. Click on the "Duplicate set" button (see Image II), and type a name for the new shortcut set in the Dialog Box. You can type in any name for the set as long as it is fewer than 27 characters. Use any punctuation marks that you like, such as commas or exclamation marks. Click the OK button and select the name of the new keyboard shortcut set from the Current Set drop-down menu. A dialog box (see Image III) will tell you that you are changing keyboard shortcut sets. Click on the OK button to close the dialog box. Tip: The XML file for your new keyboard shortcut set is not stored in its regular location. Instead, it is stored in the C:\Documents and Settings\username\Application Data\Macromedia\Dreamweaver MX2004\Configuration\Menus\Custom Sets directory. Be sure to replace username in this directory path with your user name. On a Mac this is stored in your home folder in the Library/ApplicationSupport/Macromedia/Dreamweaver MX2004/Configuration/Menus/Custom Sets folder. Taking a Shortcut Tip: Depending on the Current set you have selected, the shortcuts for this set are loaded from the related XML file. For instance, if you have loaded the Macromedia Standard shortcut set, the shortcuts are read from the "Macromedia Standard.xml" file in the C:\Program Files\Macromedia\Dreamweaver MX2004\Configuration\Menus\Custom Sets directory. If you open this file in Notepad or SimpleText, you will see something similar to: <SHORTCUTSET name="Macromedia Standard" type="factory"> The first line denotes the name of the Shortcut set (in this case, "Macromedia Standard") and the type, which in this case is "factory", which means that this is the default set that Dreamweaver MX 2004 uses. The second line denotes the Menu ID (which in this case is, "DWMenu_File_New"), which tells Dreamweaver MX 2004 where this menu item is located. In this case, the menu item is located in the "File" menu and the menu item is called "New". The keys attribute assigns a keyboard combination value that, when pressed, launches the New File dialog box. If you enter a keyboard shortcut that is already in use, Dreamweaver MX 2004 will tell you via a warning that shows up underneath the text field (Image IV). Since "Ctrl+Shift+A" is being used to insert a column in a table, we need to choose another one. Place your cursor in the text field and enter "Alt+Ctrl+Shift+S"; then click on the "Change" button. Your new keyboard shortcut will show up in the text box listing all the keyboard shortcuts, and in the detail box below. If you want to delete the shortcut you just created, simply select the shortcut from the detail box and click on the - sign to delete it. If you write a lot of your own code, you're probably familiar with Dreamweaver's Snippets feature, a tool for adding commonly used code such as database connection strings, or frequently used copyright notices, with the click of a button. MX 2004 now lets you assign keyboard shortcuts to your favorite snippets. Sharing Your Shortcuts The location of your newly created custom keyboard shortcut set will differ depending on the operating system you are using:
The file of your keyboard shortcut set will be identical to the name you just gave your keyboard shortcut set. To share the keyboard shortcut set you have just created, simply navigate to the corresponding folder above and copy the XML file and paste it into the corresponding directory on the machine you would like to share the custom keyboard shortcut set with. Once you restart Dreamweaver MX 2004, go to Edit (Alt + E) > Keyboard Shortcuts (Dreamweaver > Keyboard Shortcuts... for Macs), click on the "Current set" drop-down menu, and select the name of the keyboard shortcut set. Dreamweaver MX 2004 will load the custom keyboard shortcut set. You can also create a table of contents of sorts for your keyboard shortcuts. Open the Keyboard Shortcuts dialog box using Edit (Alt + E) > Keyboard Shortcuts (Dreamweaver > Keyboard Shortcuts... for Macs), and click on the "Export set as HTML" button (it's the third button from the left). Specify a location to save the HTML file to, enter a filename in the "Filename" text field, and click the OK button. You can print this out, or distribute it with the custom keyboard shortcut set. Conclusion If you would like to download a list of the keyboard shortcut sets that come with Dreamweaver MX 2004, you can download the Dreamweaver MX 2004 Quick Reference Guide from www.macromedia.com/support/documentation/en/dreamweaver/index.html In addition, Danilo Celic of Community MX has written a Dreamweaver MX/MX 2004 extension that will automatically place the extension in the proper place on your hard drive depending on the operating system you are using. You can download it from www.communitymx.com/abstract.cfm?cid=7EF02 Reader Feedback: Page 1 of 1
Enterprise Open Source Magazine Latest Stories . . .
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||