Mnemonic Keys - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Maplets : Mnemonic Keys

Maplets Mnemonic Key

 

Description

Examples

Description

• 

The mnemonic key (or access key) allows the user to activate buttons, check boxes, menus, menu items, radio buttons, and toggle buttons by using the keyboard.

  

The mnemonic key is specified in an element caption option. The Button, CheckBox, CheckBoxMenuItem, Menu, MenuItem, RadioButton, RadioButtonMenuItem, and ToggleButton elements accept a mnemonic key.

• 

To specify a mnemonic key for an element caption, precede the character that is to be the mnemonic key with the & character. The mnemonic appears as an underlined character.

  

For example, to specify the K of the caption OK to be the mnemonic, use "O&K".  The caption appears as OK.

• 

To display an ampersand (&) in the caption, use two ampersands (&&). For example, "A&&B" displays as "A&B" without a mnemonic key.

• 

The following table contains examples of possible captions that include a mnemonic key, where the Specification column contains examples of the Maplet application element caption text and Caption Displayed column contains the corresponding Maplet application caption appearance.

  

Note that "_character" indicates that the "character" is underlined in the Maplet application.

 

 

 

Specification

 

Caption Displayed

 

 

 

&OK

 

_OK

O&K

 

O_K

A&&B

 

A&B

A&&&B

 

A&_B

 

 

 

• 

If you specify more than one mnemonic key for a single caption, the first & specification in the caption is the mnemonic key.  The other single ampersands are ignored.  Only one mnemonic key can be specified for each caption.

• 

If a character that appears multiple times in a caption is specified to be a mnemonic key, the first instance is underlined as the mnemonic.  The mnemonic key is case-insensitive.

• 

The mnemonic key is restricted to characters that can be entered by pressing a single key.  Invalid character specifications for the mnemonic key are characters that are SHIFT key combinations or require other modifiers to enter the character.

  

If an invalid character is specified, it is displayed underlined but it does not activate the element.

• 

To activate the element using the mnemonic key, press Alt and the underlined character.  For example, if the underlined key is K for the OK button, press Alt + k to activate the button.

  

Note: On some platforms and different keyboards, another key is used instead of Alt.

Examples

withMapletsElements:

mapletMapletSelect a Button:,ButtonO&K,Shutdowntrue,Button&Cancel,Shutdown:

resultMapletsDisplaymaplet

See Also

Maplets[Elements][Button]

Maplets[Elements][CheckBox]

Maplets[Elements][CheckBoxMenuItem]

Maplets[Elements][Menu]

Maplets[Elements][MenuItem]

Maplets[Elements][RadioButton]

Maplets[Elements][RadioButtonMenuItem]

Maplets[Elements][ToggleButton]

Overview of Maplet Applications