FutureBasic Logo

<<    Index    >> FutureBasic 5

tekey$   function



Syntax:
char$ = tekey$

Description:
If there is an active edit field in the current window, tekey$ returns a 1-character string indicating a key that the user pressed. You should check the value of tekey$ within your edit-event handling routine, each time that routine is called.
When you use an edit-event handling routine, the user's keystrokes are not transmitted directly to the edit field. Based on the value returned by tekey$, your edit-event handling routine can decide what to do with the keypress; it can transmit it to the field unaltered, or transmit a different character, or perform some other action. Your routine can use the tekey$ statement to transmit the keypress (or some other character) to the edit field, if desired. tekey$ values that correspond to the backspace key, and the four arrow keys should generally be transmitted to the field unaltered.
Note that any keypresses that can't alter the contents of the field nor move the insertion point are generally not reported to your edit-event handling routine. Keypresses that will not be reported include the following:
See Also:
dialog function; tekey$ statement