The data entry functions (inpm_x(), and askf_x()) always return when the user moves away from the field. The return value usually indicates how this was done by returning values such as LEFT, RIGHT and so on, defined in the file dp4uiapi.h. (These particular values would only be returned by the inpm_x() family, because the askf_x() functions don't allow the user to move away from the current field like this.)
By default only the keys used by DP4 for moving around fields cause inpm_x() to lose focus and return. Frequently applications work by allowing users to enter a value and then press a function or other special key. It is common in retail systems for keyboards to have one hundred or more such special keys. These are normally mapped (using the keyboard configuration option in DFSETUP) to generate function keys such as F170 F97 and son on.
There are two ways to enable your input fields to respond to special keys like this:
If you want to take special action when one of the following four special keys is pressed : <Page Up>,<Page Down>, <Insert>, <Delete>, then you must set the CURS_KEYS flag instead of or as well as the FUNC_KEYS flag. The CURS_KEYS flag is used by functions like pick_record() to allow the user to move to another "page" of a pop-up window or list box.