Registering Form, Edit Mask, and Text Box Keys

The Form, JadeEditMask, and TextBox classes provide the methods listed in the following table, which enable you to register keys that are in effect for the form, edit mask, or text box.

Method Description
Form::getRegisteredFormKeys Returns an array of the form keys that are in effect for the form
Form::registerFormKeys Establishes the entire set of key codes in which the key events of a form are interested
JadeEditMask::getRegisteredKeys Returns an array of the keys that are in effect for the edit mask
JadeEditMask::registerKeys Establishes the entire set of key codes in which the key events of an edit mask are interested
TextBox::getRegisteredKeys Returns an array of the keys that are in effect for the text box
TextBox::registerKeys Establishes the entire set of key codes in which the key events of a text box are interested

For details, see Chapter 2 of the JADE Encyclopaedia of Classes.

By default, if a form, edit mask, or text box has key event methods defined, those key events are sent for any key event for any control on that form or for any edit mask or text box. In most situations, the key events are interested only in specific keys (for example, the Tab key, arrow keys, and function keys).

After calling the Form::registerFormKeys, JadeEditMask::registerKeys, or TextBox::registerKeys method with a key code list, the key events are called on the form, edit mask, or text box only if the key that is pressed is in the supplied list. This results in not having to call the form, edit mask, or text box key events for every key action, which reduces the number of events that must be sent and processed.