Event XbpCrt():keyboard Foundation
Keyboard input received.
:keyBoard := {| nKeyCode, uNIL, self | ... }
:keyBoard ( <nKeyCode> ) --> self
xbeP_Keyboard (1048580)
This method returns the object executing the method (self).
The xbeP_Keyboard event is generated whenever input is made via the keyboard that does not correspond to a default event. The first parameter of the code block or the method contains the event code returned by AppEvent() and corresponds to the key pressed.
If an XbpCrt window is displayed via the method :showModal(), Enter and Escape key strokes are treated differently by the :keyboard() event handler method. If the Enter key is pressed and the :default member variable of a child object is .T. (true), an xbeP_Activate event is sent to this child object. Likewise, if the Esc key is pressed and :cancel is .T. for one of the children, xbeP_Activate event is sent to this child object instead.
This behaviour is used to activate the standard dialog elements of modal dialogs. Such elements are usually push buttons and have captions such as "Okay" or "Cancel". Pressing the Enter key activates the "Okay" (or equivalent) button, while the Escape key triggers the action associated with the "Cancel" (or equivalent) button.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.