Metrologic Optimus S Programming Manual page 80

"c" programming guide
Table of Contents

Advertisement

74
"C" Programming Guide For Optimus S/R
clr_kb
getchar
GetKeyClick
If successful, it returns 1.
Return
Otherwise, it returns 0.
See Also
OSTimeDly
Purpose
To clear the keyboard buffer.
void clr_kb (void);
Syntax
Example
clr_kb();
Description
This routine is automatically called by the system upon powering up the
terminal.
Return
None
See Also
getchar, kbhit
Purpose
To read one character from the keyboard buffer and then remove it.
Syntax
int getchar (void);
Example
c = getchar();
if (c > 0) printf ("Key %d pressed",c);
else printf ("No key pressed");
This routine can be used with menu operation to detect a shortcut key being
Description
pressed.
Return
If successful, it returns the character read from the keyboard buffer.
Otherwise, it returns 0 to indicate the keyboard buffer is already empty.
See Also
clr_kb, kbhit
Purpose
To get the current setting of key click.
Syntax
int GetKeyClick (void);
state = GetKeyClick();
Example
Description
The key click is set to be enabled by default, but it can be changed from the
System Menu or through programming.
Return
If key click is enabled, it returns 1~5 to indicate different tones.
Otherwise, it returns 0.
See Also
SetKeyClick

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents