Specifies one or more modifier keys that must be pressed with the button shortcut key specified by the acceleratorKey property.
# Metadata
Platforms: desktop OS: mac, windows, linux Introduced: 1.0 Security:
# Syntax
set the acceleratorModifiers of button to {empty | keys}
# Examples
set the acceleratorModifiers of button 1 to shift
set the accelMods of button "Speak" to control,alt
set the accelMods of button it to command,shift
# 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.
>*Cross-platform note:* On Mac OS, the Control key and > Command key are equivalent when used with this property. The > option Key is likewise also equivalent to the Alt key.
# Tags
ui,
# See
- **keyword:** button - **glossary:** property, key combination, handler, Option key, execute, Command key, modifier key, Mac OS - **property:** acceleratorKey, acceleratorText