Metrologic Optimus S Programming Manual page 70

"c" programming guide
Table of Contents

Advertisement

64
"C" Programming Guide For Optimus S/R
The SendData() routine can not only transmit simple characters as above, but also provide a
way to transmit combination key status, or even direct scan codes. This is done by inserting
some special command codes in the output string. A command code is a character whose
value is between 0xC0 and 0xFF.
0xC0 : Indicates that the next character is to be treated as scan code. Transmit it as it is, no
translation required.
0xC0 | 0x01 : Send next character with Shift key.
0xC0 | 0x02 : Send next character with left Ctrl key.
0xC0 | 0x04 : Send next character with left Alt key.
0xC0 | 0x08 : Send next character with right Ctrl key.
0xC0 | 0x10 : Send next character with right Alt key.
0xC0 | 0x20 : Clear all combination status key after sending the next character.
For example, to send [A] [Ctrl-Insert] [5] [scan code 0x29] [Tab] [2] [Shift-Ctrl-A] [B]
[Alt-1] [Alt-2-Break] [Alt-1] [Alt-3], the following characters are inserted into the string
supplied to the SendData() routine.
0x41, 0xC2, 0x01, 0x35, 0xC0, 0x29, 0x09, 0x32, 0xC3, 0x41, 0x42, 0xC4, 0x31
0xE4, 0x32, 0xC4, 0x31, 0xC4, 0x33
Please note that, the scan code 0x29 is actually a space for PCAT, Alt-12 is a form feed
character, and Alt-13 is an Enter. The break after Alt-12 is necessary, if omitted the
characters will be treated as Alt-1213 instead of Alt-12 and Alt-13.
SendData
WedgeReady
To send a string to the host via keyboard wedge interface.
Purpose
Syntax
void SendData (char *out_str);
Example
SendData (CodeBuf);
Description
This routine transmits a string pointed by out_str to the keyboard wedge
interface.
Return
None
See Also
WedgeReady
Purpose
To check if the keyboard wedge is ready to send data.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Optimus r

Table of Contents