Appendix K: Modifying the Shortcut File
Changing Keyboard Shortcuts
You can change keyboard shortcuts in Dreamweaver either by using a previously unused shortcut or by reassigning an existing shortcut to a different menu item. In Chapter 19, I discuss using Dreamweaver 4's new Keyboard Shortcut Manager (Figure 1). This appendix is for people who would rather reassign keyboard shortcuts by editing the menus.xml file instead of using a dialog box. Figure 1. Dreamweaver 4 features a new, easy-to-use Keyboard Shortcut Manager. I discuss using this dialog box in Chapter 19.
Tip
The Dreamweaver help files include a Keyboard Shortcut Matrix (Figure 2) that displays standard key combinations and the command attached, if any. The location on your computer is something like this:
Windows:
C:\PROGRAM FILES\MACROMEDIA\DREAMWEAVER 4\ Help\UsingDreamweaver\html\23AppAShortcuts26.html
Mac:
Hard Drive/Macromedia/ Dreamweaver 4/Help/ UsingDreamweaver/html/ 23AppAShortcuts26.html
Figure 2. The Keyboard Shortcut Matrix lists all existing and empty keyboard shortcuts in Dreamweaver.
You can also open the file called 23AppAShortcuts1.html, in the same folder to browse through a list of shortcuts by category. Click the arrows to move through the pages.
To change a keyboard shortcut:
If you need to remove references to your shortcut first, locate, in the menus.xml file, the menu command that contains the shortcut you want to use, and copy the shortcut (Ctrl+C/Cmd+C).
If the menu item already has a shortcut, select it and paste the shortcut over it (Figure 3).
Figure 3. I'm changing every reference to the Properties inspector to indicate my new shortcut. By using "Cmd" instead of "Ctrl," my shortcut will work on both Windows and the Mac.
If the menu item does not have a shortcut, you need to add the key attribute:
key="Ctrl+Shift+P"
Figure 4. You can see, in the Window menu, that I changed the keyboard shortcut for displaying the Properties inspector. Note that "Cmd" shows up as "Ctrl" on the PC. On the Mac, it would be displayed as the butterfly symbol that's on the Command key.
If a shortcut is assigned to two different menu items, the first pairing listed in menus.xml will be the working combination. That means it's especially important to make the changes in the keyboard shortcuts section at the top of the menus.xml file.
Some people like clicking on buttons, some people prefer to do their selecting with menus, and others like the quick convenience of keyboard shortcuts.
Why would you want to be able to edit these shortcuts in Dreamweaver? I don't know about you, but I have a lot of standard keyboard shortcuts memorized, and not so many nonstandard ones. I remember that F10 opens the HTML inspector, but if I want to open any other palette or inspector, I'm pretty much wedded to the Window menu.
You can, however, change keyboard shortcuts so that they work for you.
For instance, the Properties inspector didn't even get a keyboard shortcut in Dreamweaver 1.2, and I can't seem to remember Ctrl+F3. So I decided to make it more like P, for Properties. Ctrl+P is paste, and I don't want to change that. So I open the Keyboard Shortcuts editor, select Window > Properties, and then press Ctrl+Shift+P.It looks like Ctrl+Shift+P is Format: Paragraph. I don't use that shortcut, anyway. So I can go ahead and change it.
|