Defining Function Keys [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Self-Paced Training Guide
Defining Function Keys
The keys you will define in this lesson are two sets of terminal function
keys: the product_keys function keys, which are attached to the prod_wnd
window, and the option_keys function keys, which are attached to the
option and new_option windows.
These sets of keys both display a function key that allows the user to
scroll the options for the current product.
The product_keys key set also has a key that allows the user to select
option updating. The option_keys function key set has a key that allows
the user to return to product updating.
Each function key calls a function to perform the action.
Menu Path
To access the Function Key Screen:
1. From the main menu, select the Screens option.
2. Choose Function Keys.
Screen Description
This screen allows you to define the actions, labels, and associated
switches for a set of function keys.
Function Keys Screen
To enter the field values:
Field Entry Explanation
---------------------------------------------------------------------------------------
Function Keys product_keys This is the name of the function key set
within the application.
When you press Return, HP ALLBASE/4GL
supplies a default set of function key
definitions. These default definitions
satisfy the basic needs of all screens.
You can create your own default set of keys
by defining a function key set called
default_keys in your application. Refer to
the HP ALLBASE/4GL Developer Reference
Manual for more information.
The rest of the screen is divided into eight rows, each containing four
fields. There is one row for each key. The function key number is
displayed to the left of these fields. The following steps show you how
to define function key number 1.
To define function key f1:
Field Entry Explanation
---------------------------------------------------------------------------------------
Action F-option This is the action that HP ALLBASE/4GL
performs when the user presses function key
f1. The first character is the action
type. In this case F indicates a function.
When the user presses the key, the function
option is executed.
The HP ALLBASE/4GL Developer Reference
Manual contains a list of the actions that
can be called from function keys, and the
prefixes for these actions.
Label Text Line 1 Options This is the first line of the function key
label that appears on the screen. Try to
center the word in the field on the screen.
Label Text Line 2 Leave this field This is the second line of the function key
blank. label that appears on the screen.
Switch Number Leave this field This field is used to associate a user
blank. switch with a function key. If you enter a
number in this field, an asterisk appears
at the end of the first line of the label
text on the screen.
When the function key set is displayed on
an application screen, the asterisk shows
the status of the switch. When user switch
1 is on, the asterisk appears. When the
switch is off, the asterisk is cleared.
Typically you would use this feature to
show the end user the status of a function.
For example, you could use a function
associated with the function key to toggle
a particular operating mode.
To complete the screen:
1. Define the next function key as shown below.
Function Key f4
Action F-scroll_options
Label Text Line 1 Scroll
Label Text Line 2 Options
2. Leave the default definitions for the remaining keys.
3. Press Commit Data to create this function key set.
Defining a Second Function Key Set
1. Now create the option_keys function key set in a similar way,
using the following information.
Function Key Set Name option_keys
a. Function Key 1
Action F-product
Label Text Line 1 Products
b. Function Key f4
Action F-scroll_options
Label Text Line 1 Scroll
Label Text Line 2 Options
2. Leave the default definitions for the remaining keys.
3. Press Commit Data to create this function key set.
MPE/iX 5.0 Documentation