Creating Button and Auxiliary Menus

The Buttons (***BUTTONSn) and Aux (***AUXn) menus are identical in format. Their use depends on the type of pointing devices you are using. The system mouse uses the auxiliary menus, and any other pointing device (such as a digitizing puck or other input device) uses the button menus. All references to auxiliary menus apply equally to button menus: the BUTTONS1 menu functions identically to the AUX1 menu and so on.

The AUXn sections of the menu file define the menu macros associated with the buttons on your mouse. Each line in this section represents a mouse button. You can access each button menu with the key/button sequences shown in the following table.

Key/button sequence Menu sections
Simple button press AUX1 and BUTTONS1
SHIFT + button press AUX2 and BUTTONS2
CTRL + button press AUX3 and BUTTONS3
CTRL + SHIFT + button press AUX4 and BUTTONS4

Although the areas 1 through 4 are the only active sections, you can define additional sections and swap them into the active sections. In earlier releases, this was achieved with submenus (such as **othermenu). The **label syntax is used for section aliases in the Buttons and Aux sections.

Creating or customizing button menus can make using the pointing device more efficient and dynamic. By selecting the menu items and adding them to the button menu, you can personalize your pointing device to fit your needs.

For example, the BUTTONS1 section of a simple .mnu file might include the following lines:

***BUTTONS1
;
$P0=*
^C^C
^B
^O
^G
^D
^E
^T

The first line after the menu section label, ***BUTTONS1, represents the next button after the pick button on your pointing device. If the pick button is button number 1, the semicolon (;) assigns ENTER to button 2 on your pointing device. The second line after the menu section label represents the third button.

Note: You cannot reassign the pick button. The pick button may be different on different pointing devices, depending on the manufacturer.

Because labels in button menus are not displayed, you can use the labels as comments. The following example uses the label area to note the button number.

***BUTTONS1
[button no.2];
[button no.3]$P0=*
[button no.4]^C^C
[button no.5]^B

The macro assigned to button 3 in the example causes another menu to be displayed. It has the format

$Pn=*

where $ is the special character code for loading a menu area; Pn specifies the Pop menu section; and =* displays what is currently loaded to the specified menu area.

Therefore, in the example from aclt.mnu, choosing button 3 displays the menu assigned to the P0 menu area (the cursor menu). Typically, the ***POP0 section of the menu file is assigned to the P0 menu area.

Each remaining line in that section assigns a command sequence to each subsequent button on the pointing device: for example, ^C^C (ESC twice) to button 4, ^B (Snap mode toggle) to button 5, and so on. Your pointing device can recognize as many lines as it has assignable buttons.

Swapping Button and Auxiliary Menus
Accepting Coordinate Input in Button Menus


See Also
Creating Shortcut Keys