The Alt_Key program is used to show where keyboard accelerators (mnemonics in Gtk-speak) should go in menu option texts and dialog labels. The program produces optimal results on the basis that the best accelerator is the first character, the second best is the first character of a word, the third best is any character, the worst is no accelerator at all, and no accelerator should be used more than once. (When there are choices the algorithm favours an uppercase letter at the start of a word over a lowercase one, and favours words nearer the beginning.)

Enter a list of strings (such as menu option texts or dialog labels), one per line, in the left hand text edit. You can use the standard keyboard shortcuts (e.g., Ctrl+A to select all, Ctrl+C to copy, Ctrl+X to cut, Ctrl+V to paste, Ctrl+Z to undo), when editing the text. You can save your strings by clicking Save (or by pressing Ctrl+S). Once you have entered your strings, click Calculate and the right hand (read-only, but selectable with Ctrl+A) text edit will show the same list of strings but with accelerators added. You can copy the accelerated strings to the clipboard by clicking the Copy to Clipboard button.

If you want to force a particular accelerator to be used (for example, Cut in an Edit menu), precede the character to be accelerated with an ampersand (e.g., Cu&t). If you want a literal &, use &&. Lines can be turned into comments by starting them with #. If you want to ensure consistency you can set some global predefined accelerators in the Options dialog, for example, Cu&t and &Copy.

If you want to have more than one list of strings (two or more lists of menu option texts or two or more sets of dialog labels, perhaps from different tabs), simply separate each list with a single (uncommented) blank line—then, when you click Calculate each list will be calculated individually.

A summary of the results are output in the log area at the bottom of the main window.

The quality is a measure against the optimal results criteria—in most cases it is impossible to get a quality of 100% (since this means that the first character of every string is used as an accelerator, and quite often two or more strings begin with the same character), but providing there are fewer strings than the alphabet being used (normally < 36), then a quality of > 50% should be routinely achieved.

Several example files are supplied; they all have .acc extensions. Now that the Kuhn-Munkres algorithm is used calculations are always "instantaneous".