The user selects a menu field by pressing the Menu Selection key (KEY_ENTER by default) while on the field, or by pressing the menu selection character for the desired menu field (See Chapter 22, "Using Menu Options and Features," for more information on menu selection characters and how to set them for a particular field). Vermont Views always calls the event function km_select() to invoke the menu action function.
km_select() is the event function associated with the Menu Selection key. When the user presses that key, km_select() is called automatically. When the user presses the selection character for a particular menu field, however, the default event function km_chproc() is called to determine whether the key the user pressed is the selection character for any menu field on the current menu. If the user did, in fact, press the selection character for a menu field, Vermont Views makes that menu field the current field, and then posts an AC_KEYPRESS event using the Menu Selection key KEY_ENTER. This makes it appear as though the user has moved to the field in question and then pressed the Enter key himself. km_select() is called, and it calls the menu action function for the field.
Because Vermont Views is posting a particular keystroke when the user types the selection character for a menu field, Vermont Views must always know which key is associated with the action function km_select() in the menu field event table MNETP. There must always be a key associated with the function km_select() in that table. If you change the Menu Selection key, you must notify the system about the new key assignment by calling the function se_mnselectkey(). See Chapter 22, "Using Menu Options and Features," for more information about the function se_mnselectkey().