Activation keys

Activation key is either a first letter of the menu option, or a key sequence specified in the KEY clause of the menu COMMAND.

First letter of a menu option as an activation key

If the user types a letter, 4GL verifies whether this letter is unique among the options names:

Activation key in the KEY clause

The used key in the KEY clause should be unique among other KEY clauses within the same menu. You can use the default key for a menu option as activation KEY in the menu clause, this will not cause an error. If the KEY clause is present, the initial letters of the menu options cease to be their activation keys and produce no effect when pressed.

 

If you specify the same key as the activation key in the KEY clauses of several menu options, the first option on the list will be activated if the user presses this key. The order of the menu options is determined by the order in which their COMMAND clauses are listed within the MENU statement.

MENU "Main"

COMMAND KEY (F6, "U") "Update" HELP 87

COMMAND KEY (F6, "G") "Search" HELP 90

END MENU

If the user presses the "F6" key in the example above, the "Update" option will be activated, but the "Search" option will never be activated with the help of this key.

 

If you specify the activation key for one menu option the same as the initial letter of the other option without the KEY clause, the KEY clause will prevail over the initial letter as the default activation key. In the example below pressing "S" key will result in selecting the "Add" option rather than "Search" option:

MENU "Main"

COMMAND KEY ("S") "Add"

COMMAND "Search"

END MENU

Even if the cursor will be at the "Search", pressing the "S" key will nevertheless activate the "Add" option.

 

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.