Here is some information that will be useful to you if you need to run your application in character-mode:

In a character interface, use the ENTER-MENUBAR key function (usually mapped to F3) to give focus to the menu bar. You can then use the left and right arrow keys to position to a submenu label within the menu. Press RETURN to pull down the menu and the up and down arrow keys to position to a menu item. Press RETURN again to choose the menu item.

The choice of key labels for accelerators is limited by the keys available on your keyboard. For example, some terminals have no F2 key, but might have a PF2 key or require a CTRL key combination to emulate common F2 key functionality.

For portability, you can use the KBLABEL function to specify the accelerator key label, as shown in the following example:

MENU-ITEM m_Help LABEL “Help Menu” ACCELERATOR KBLABEL(“HELP”)

This function lets you use a portable ABL key function, such as HELP, to identify a valid key label for the current keyboard or terminal type. The key label is one that is associated with the key function for the terminal type in the current environment. In Windows, the current environment might reside in the registry or in an initialization file.

However, note that the current environment can (and often does) define more than one key label for a given ABL key function. The KBLABEL function returns the first such definition specified for the terminal type. For example, some terminal types define F2 and also ESC+? as the HELP key function. In this case, using KBLABEL(“HELP”) changes F2 to a menu item accelerator (losing its HELP key function), but leaves ESC+? as the one remaining HELP key function.

There are two types of invalid menu accelerators:

  • Those specified by using a key label that is unsupported by the terminal
  • Those specified with supported key labels, that when invoked, generate unrecognized keyboard codes

If you specify an unsupported key label, such as ALT in ALT+F9, the AVM substitutes a supported key label in its place. Thus, the AVM might substitute ESC+F9 for ALT+F9 as the accelerator definition.

However, an accelerator like ESC+F9 might not work at run time. In this case, ESC+F9 generates unrecognizable keyboard code sequences that fail to fire the appropriate ABL event. The terminal might also indicate the failure with a beep or other warning signal.

When in doubt, specify the menu accelerator using the terminal-portable KBLABEL function.

Conclusion

You have learned how to add many different kinds of visual objects to your application windows. In the next section, you return to the non-visual aspects of the language, and you learn more about how to define and use queries. This will prepare you for doing more with the browse object, which uses a query as its source for the result set it displays.