[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

TlpKeyboardInput

PURPOSE
Keyboard detection with timout and input options.
PROTOTYPE
Trap: TlpErr TlpKeyboardInput (UInt16 refNum, UInt8 *response, UInt8 *responseLength, TlpKbdFlags flags, UInt8 charTimeOut, UInt16 totalTimeOut)

PARAMETERS
response OUT the received keys
responseLength IN OUT the size of response
flags IN options
charTimeOut IN intercharacter timeout
totalTimeOut IN global timeout for the processing

DESCRIPTION
Block until responseLength character are entered, or the input is ended by VALID, or ANNUL, or charTimeOut seconds elaspe between two key strokes.

charTimeOut allows to setup an intercharacter timeout between 1s and 255s (0 means 120s, the default timeout value); this timeout is used by the reader whuch can return tlpErrKbdTimeOut if it expires.

totalTimeOut is the number of seconds that the library should wait for a response of the reader. Because the user might type a key sequence like 1 CORR 1 CORR ... infinitely there is no way for the library to compute the maximum wait time. Use value 0 to wait infinitely. This timeout is handled by the PalmOS system, thus this library will return tlpErrPalmOS in this event.

flags can be used to specify several options, including whether the input must be echoed or whether the VALID key is active. 0 is transparent mode: every key is accepted as is (not interpreted) and the input is echoed.

Not that this functions will block (up to charTimeOut * *reponseLength seconds) until the keyboard output is received.

RETURN CODES
tlpSuccess
Successfull operation.
tlpErrUnknownReaderCommand
Unknow reader command (not a valid command code).
tlpErrKbdAnnul
Current keyboard input terminated by ANNUL hit.
tlpErrKbdTimeOut
Current keyboard input terminated by a timeout.
tlpErrKbdValid
Current keyboard input terminated by VALID hit.
tlpErrPalmOS
Error from the Palm host (such as a serial or memory error). Call TlpGetLastErr to get the last Palm error code.
tlpErrConversation
Conversation error between the host and the terminal.

SEE ALSO
enum TlpKbdFlags.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Alexandre Duret-Lutz on August, 7 2001 using texi2html