Name: acceleratorModifiers

Type: property

Syntax: set the acceleratorModifiers of <button> to {empty | <keys>}

Summary: Specifies one or more <modifier key|modifier keys> that must be pressed with the <button> shortcut key specified by the <acceleratorKey> <property>.

Synonyms: accelMods

Associations: button

Introduced: 1.0

OS: mac,windows,linux

Platforms: desktop,web

Example:
set the acceleratorModifiers of button 1 to shift

Example:
set the accelMods of button "Speak" to control,alt

Example:
set the accelMods of button it to command,shift

Value:
The <acceleratorModifiers> of a button consists of a list of one or more keys, separated by commas.
The <keys> can be any of "control", "command", "alt", "option", and "shift". If you use "command" as a key, it is converted to "control". If you use "option" as a key, it is converted to "alt".

By default, the <acceleratorModifiers> of a newly created <button> is empty.

Description:
Use the <acceleratorModifiers> <property>, along with the <acceleratorKey> <property>, to specify a shortcut <key combination> for a <button>.

The following statements set up a shortcut for a button called "Calculate":

  set the acceleratorKey of button "Calculate" to "C"
  set the acceleratorModifiers of button "Calculate" to alt,shift

When the user presses Alt-Shift-C (on Unix or Window systems) or Option-Shift-C (on Mac OS systems), the button's mouseUp <handler> is <execute|executed>.

>*Cross-platform note:*  On <Mac OS|Mac OS systems>, the Control key and <Command key> are equivalent when used with this <property>. The <option Key> is likewise also equivalent to the Alt key.

References: acceleratorKey (property), acceleratorText (property), button (keyword), property (glossary), key combination (glossary), handler (glossary), Option key (glossary), execute (glossary), Command key (glossary), modifier key (glossary), Mac OS (glossary)

Tags: ui
