Comments
Patrick Collands wrote: collands (AT) gmail com I'd be very grateful for an invitation. Thank you.
Cloud Expo on Google News

SYS-CON.TV

2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Click For 2008 West
Event Webcasts
Have It Your Way
Custom keyboard shortcuts in Dreamweaver MX 2004

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?
Shortcuts are an easy way to access menu functions without having to use your mouse. They can be used to perform simple tasks such as opening or saving a file, or more complex tasks such as moving or copying files from one location to another.

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
Fire up Dreamweaver MX 2004 and select Edit (Alt + E) > Keyboard Shortcuts (Dreamweaver > Keyboard Shortcuts... for Macs). This will launch the Keyboard Shortcuts dialog box, which might take a minute or two depending on the speed of your computer and other variables. The data being loaded comes from the menus.xml file located in the C:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration\Menus directory and the four XML files located in the C:\Program Files\Macromedia\Dreamweaver MX 2004\Configuration\Menus\Custom Sets directory. (On the Mac these folders are located in Library/Application Support/Dreamweaver MX 2004/Configuration folder.) I say four because that's the number of default keyboard shortcuts sets that Dreamweaver MX 2004 will install.

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
In the "Commands" drop-down menu, you will see six options: Menu commands, Site panel, Code editing, Document editing, Site window, and Snippets (on a Mac there are just four options: Menu commands, Code editing, Document editing, and Snippets). Select "Menu commands" from the drop-down menu, and in the text box below you'll see a list of all the menus in Dreamweaver MX 2004. Next to the name of the menu, you'll see a plus sign. This indicates the presence of an expandable list. Go ahead and click the + sign next to the word "File". What we are going to do is assign a shortcut to the "Save All" menu item. Select the "Save All" item and then click the + sign next to the word "Shortcuts". Place your cursor in the "Press key" text field and press the following keyboard combination: "Ctrl+Shift+A".

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">
<SHORTCUT ID="DWMenu_File_New" keys="Cmd+N"/>

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
Now that you've mastered the art of creating a shortcut set, you can actually share the set you just created with other people, like a development team or an IT department.

The location of your newly created custom keyboard shortcut set will differ depending on the operating system you are using:

  • Windows XP/XP Pro: C:\Documents and Settings\username\Application Data\Macromedia\Dreamweaver MX 2004\Configuration\Menus\Custom Sets
  • Macintosh OS X: Hard Drive:Users:username:Library:Application Support: Applications:Macromedia Dreamweaver MX 2004:Configuration:Custom Sets

    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
    Using the Keyboard Shortcuts dialog box is just one of the many ways you can extend the use of Dreamweaver MX 2004. No longer will you have to search through the menus looking for that elusive menu item. By assigning a shortcut to one or more menu items that you use often, you are cutting down on your development time and improving your workflow.

    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

  • About Justin Kozuch
    Justin Kozuch is a writer, web developer, and Team Macromedia member who takes pride in helping other Macromedia Dreamweaver users. His work is published weekly on CommunityMX.com, the home of the MX Community. He's also the Founder of Dreaming in TO (http://www.dreaminginto.com), a Macromedia Dreamweaver User Group located in Toronto, ON. A dynamic "junkie", Justin's passion lies in PHP/mySQL, organic design and breadcrumb navigation.

    In order to post a comment you need to be registered and logged in.

    Register | Sign-in

    Reader Feedback: Page 1 of 1

    Latest Cloud Developer Stories
    CloudBench Applications, Inc. announced its financial results for the three months and nine months ending September 30, 2009. All amounts are stated in Canadian dollars unless otherwise noted. Revenues from BasicGov, the Company's cloud computing solution for local government, gr...
    The new contract is an industry first, with CSC being the first Microsoft partner to lead and win a cloud computing services agreement of this scale. Under terms of the contract, CSC will provide Royal Mail Group's 30,000 employees with access to new IT services using Microsoft's...
    Operates in over 170 countries and is one of the world’s leading providers of communications solutions and services. Richard Tarboton talks for MeettheBoss.TV on his role as Head of Energy & Carbon for BT and what they are doing towards reducing carbon emissions.
    CA is going to put its Agile Planner software on salesforce.com’s Force.com platform in the first half to accelerate development time and give users visibility over their development initiatives to reduce time-to-market. Customers are supposed to be able to accelerate the deploym...
    Despite its uncertain fate Sun soldiers on. Monday it trotted out a cloud-based multiplatform desktop as a service for K-12 and community colleges that can run Windows, the Mac OS, Linux and Solaris applications to nearly any client device, including its own Sun Ray thin clients....
    Subscribe to the World's Most Powerful Newsletters
    Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

    SYS-CON Featured Whitepapers
    ADS BY GOOGLE

    Breaking Cloud Computing News
    CloudBench Applications, Inc. announced its financial results for the three months and nine months e...