>There are five ways out of a test box (at least for the purposes of this discussion: You reach the number of characters supplied in the input mask, press enter, tab, shift + tab, or click on another control. If CONFIRM is OFF, in the first case you'll get the last key press. If you don't reach the number of characters in the input mask, pressing Enter returns 13, tab, 9, shift + tab 15, and clicking on another control 7. However, if CONFIRM is set to ON, then LASTKEY() will always return 13 when Enter is pressed or another control is clicked on, and tab and shift + tab the same as before.
Remarks
The values returned by LASTKEY( ) are the same as the values returned by INKEY( ). See INKEY( ) for a list of keys and their return values.
LASTKEY( ) is updated when you move between controls.