Reassigning the Choice List Key in the Form Event Table

Field entry from a choice list is implemented by the event function kd_clist(). List entry is initially assigned to KEY_F2 in the form event table, FMETP. You can reassign or disable this event function, as with any other event function in the system. You can do this by editing the event table in the header file vv_glob.h or by calling one of the functions that modify the event table.

Unlike most key assignments, however, if you reassign the Choice List key, you must make an extra function call to notify the system what key now calls the choice list event function kd_clist(). Use the set choice list key function, se_clistkey():

void se_clistkey(keycode)

int keycode;        /* Keycode assigned to kd_clist()        */

Vermont Views automatically pops up the choice list if the choice list option CLPOP is ON. This is done by posting an event which simulates a Choice List key press. If you change the Choice List key, you must notify the system in order for this process to work.

For example, the following code fragment swaps the key assignments of F2 and F9 so that the Choice List key is now assigned to F9. It then informs the system that the new Choice List key is F9:

former_fp = et_rplevnt(KEY_F9, kd_clist, FMETP);

et_rplevnt(KEY_F2, former_fp, FMETP);

se_clistkey(KEY_F9);


Home Contents Previous Next