beautypg.com

Tool – Adobe Extending Dreamweaver CS4 User Manual

Page 152

background image

146

EXTENDING DREAMWEAVER CS4

Menus and menu commands

Attributes

key, {app}, {platform}, {file}, {arguments}, {command}, id, {name}

key

The key combination that activates the keyboard shortcut. For syntax details, see

” on page 143.

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

arguments="'redo'" id="DWShortcuts_Edit_Redo" />

Description
Represents one tool; it contains all the shortcuts for the tool as subtags in the menus.xml file.

Attributes

{name}, id

name

A localized version of the tool name.

id

The internal tool identifier that identifies the tool to which the shortcuts apply.

Contents
This tag can contain one or more

activate

,

override

, or

action

tags.

Container
This tag must be contained in a

menu

tag.

This manual is related to the following products: