4.9 WFS_CMD_TTU_READ

Description This command activates the keyboard of the text terminal unit for input of the specified number of characters. Depending on the specified flush mode the input buffer is cleared.

Input Param LPWFSTTUREAD lpRead;

typedef struct _wfs_ttu_read
{
WORD wNumOfChars;
WORD fwMode;
WORD wPosX;
WORD wPosY;
WORD fwEchoMode;
WORD fwEchoAttr;
WORD wKeys;
BOOL bCursor;
BOOL bFlush;
BOOL bAutoEnd;
} WFSTTUREAD, * LPWFSTTUREAD;

wNumOfChars
Specifies the number of characters that will be read from the text terminal unit key pad.

fwMode
Specifies where the cursor is positioned for the read operation. Possible values are:

Value Meaning

WFS_TTU_POSRELATIVE The cursor is positioned relative to the current cursor position.

WFS_TTU_POSABSOLUTE The cursor is positioned absolute at the position specified in wPosX and wPosY.

wPosX
Specifies the horizontal position, if fwMode is set to WFS_TTU_POSABSOLUTE. Or an offset relative to the current cursor position, if fwMode is set to WFS_TTU_POSRELATIVE.

wPosY
Specifies the vertical position, if fwMode is set to WFS_TTU_POSABSOLUTE. Or an offset relative to the current cursor position, if fwMode is set to WFS_TTU_POSRELATIVE.

fwEchoMode
Specifies how the user input is echoed to the screen as one of the following flags:

Value Meaning

WFS_TTU_ECHOTEXT The user input is echoed to the screen.

WFS_TTU_ECHOINVISIBLE The user input is not echoed to the screen.

WFS_TTU_ECHOPASSWORD The keys entered by the user are echoed as the replace character on the screen.

fwEchoAttr
Specifies the text attributes with which the user input is echoed to the screen as a combination of the following flags:

Value Meaning

WFS_TTU_TEXTUNDERLINED The displayed text will be underlined.

WFS_TTU_TEXTINVERTED The displayed text will be inverted.

WFS_TTU_TEXTFLASH The displayed text will be flashing.

wKeys
Specifies the keys which will be accepted as input to this command as on of the following flags:

Value Meaning

WFS_TTU_KEYNUMERIC Accept numeric values.

WFS_TTU_KEYHEXADECIMAL Accept hexadecimal values.

WFS_TTU_KEYALPHANUMERIC Accept alphanumeric values.

bCursor
Specifies whether the cursor is visible (TRUE) or invisible (FALSE).

bFlush
Specifies whether the keyboard input buffer is cleared before allowing for user input (TRUE) or not (FALSE).

bAutoEnd
Specifies whether the command input is automatically ended by the Service Provider if the maximum number of digits is entered.

Output Param LPSTR lpszInput;

lpszInput
Specifies a zero terminated string containing all the characters read from the text terminal unit key pad.

Error Codes The following additional error codes can be generated by this command:

Value Meaning

WFS_ERR_TTU_KEYCANCELED The read operation was terminated by pressing the <CANCEL>-key.

Events There are no additional events generated by this command.

Comments None.