Macromedia dreamweaver 8-extending dreamweaver 사용자 설명서

다운로드
페이지 504
188
Menus and Menu Commands
<shortcut>
Description
Specifies a keyboard shortcut in the menus.xml file.
Attributes
key, {app}, {platform}, {file}, {arguments}, {command}, id, {name}
key
 
The key combination that activates the keyboard shortcut. For syntax details, see 
app
 The name of the application in which the shortcut is available. Not currently used.
platform
 Specifies that the shortcut works only on the indicated platform. Valid values 
are 
"win"
 and 
"mac"
. If you do not specify this attribute, the shortcut works on both 
platforms.
file
 The path to a file containing the JavaScript code that Dreamweaver executes when 
you use the keyboard shortcut. The 
file
 attribute overrides the 
command
 attribute. You 
must specify either 
file
 or 
command
 for each shortcut.
arguments
 
Provides arguments for Dreamweaver to pass to the code in the JavaScript file 
that you specify in the 
file
 attribute. Enclose arguments in single quotation marks ('), 
inside the double quotation marks (") used to delimit an attribute’s value.
command
 The JavaScript code that Dreamweaver executes when you use the keyboard 
shortcut. Specify either 
file
 or 
command
 for each shortcut.
id
 A unique identifier for a shortcut.
name
 A name for the command executed by the keyboard shortcut, in the style of a menu 
command name. For example, the 
name
 attribute for the F12 shortcut is 
"Preview in 
Primary Browser
"
.
Contents
None (empty tag).
Container
This tag must be contained in a 
shortcutlist
 tag.
Example
<shortcut key="Cmd+Shift+Z" file="Menus/MM/Edit_Clipboard.htm"
arguments="’redo’" id="DWShortcuts_Edit_Redo" />