Global Variable

NSMultiLevelAcceleratorButton

A multilevel accelerator button is a variation of a normal accelerator button that allows for a configurable number of stepped pressure levels. As each one is reached, the user receives light tactile feedback and an action is sent.

Declaration

const NSButtonType NSMultiLevelAcceleratorButton;

Discussion

The number of pressure levels for a multilevel accelerator button is configured by adjusting the value of the maxAcceleratorLevel property of NSButton. For other types of buttons, this property value defaults to 1. For multilevel accelerator buttons, this property value defaults to 2, and may be set to a value between 1 and 5.

Like a normal accelerator button, the button sends an action when the user first clicks it. If configured as continuous (see continuous), while pressed, it then sends actions at repeating intervals that are based on pressure. If not configured as continuous, actions are sent as the user force clicks (presses harder) and reaches different levels of pressure. Once released, a final action is sent.

The value of a multilevel accelerator button is distinct from its state. The integerValue of a multilevel button is 0 when not clicked, or 1 through 5 when clicked, depending on the level of pressure. If the value of a multilevel accelerator button is explicitly set, actions are not sent until pressure reaches the specified level.

On a system that doesn’t support pressure sensitivity, a multilevel accelerator button always has a value of 1 when the user clicks it.