*Exit.labelString: Quit
This resource sets the label for the item button to "Quit", but since the mnemonic for the button is hard−coded to "x",
there is visual feedback, and the mnemonic itself is counterintuitive.
The best way to handle this situation is to specify both the label string and the mnemonic in the same place: a resource
file or application code. For example:
*Exit.labelString: Exit
*Exit.mnemonic: x
Setting both of these resources in the same way helps ensure that an application has a consistent interface.
16.3.4 Accelerators
The purpose of menu accelerators is to provide the user with the ability to activate menu items in a PulldownMenu
without having to display the menu at all. In Figure 15−1, the Quit menu item displayed the accelerator Ctrl+C to
indicate that the user could press the CTRL−C keyboard sequence to activate that menu item and quit the application.
To install a accelerator on a menu item, use the XmNaccelerator resource to specify the accelerator translation
and XmNacceleratorText to provide visual feedback to the user. A side effect of the implementation of Motif
accelerators is that you cannot install your own accelerators using the standard methods provided by the X Toolkit
Intrinsics (such as XtInstallAccelerators() or XtInstallAllAccelerators()). These functions will
not work, and you may interfere with the Motif accelerator mechanism by attempting to use them. These resources are
defined by the Label class, but they only work for PushButtons and ToggleButtons ...