86
CY4636 WirelessUSB™ LP Keyboard Mouse Reference Design Kit User Guide, Doc. # 001-70355 Rev. *A
Code Examples
Keyboard Application Report Formats.
The first byte of the data packet payload, byte 2 of the
radio packet, is used as a keyboard application report header. There are five possible keyboard
application reports. The reports are:
■
Standard 101 keys report
■
Multimedia keys report
■
Power keys report
■
Keep alive report
■
Battery voltage level report
The first application report byte is Scan Code 1 if the byte is less than 0xFC. Otherwise, the first
application report byte is the Application Report Header (Multimedia, Power, Battery, or Keep Alive).
This also assumes that multimedia and power keys do not use modifier keys and that 0xFF, 0xFE,
0xFD and 0xFC are not valid Standard 101 key scan codes.
Trailing zeros in the reports are also removed to further minimize the number of bytes sent by the
radio.
The LP radio sends the reports with the format shown in Table 5.3-4.
Table 5-14. LP Generic Report
■
Standard 101 Keys Report
If the Application Report Header byte is less than 0xFC then this indicates that this report is a Stan-
dard 101 Keys Report and the first byte is the actual scan code rather than the Report Header. This
is done to optimize the packet size based on the fact that the most common report will have only one
non-zero scan code without a modifier. The full Standard 101 Keys report format is listed in the fol-
lowing table.
Example
The following reports would be sent if a user presses an 'a' on the keyboard. The down key
packet sent from the keyboard to the bridge is shown in
Table 5-16
.
Table 5-15. Standard 101 Keys Report Format
Byte
Name
2
Scan Code 1 (<0xFC)
3
Modifier Keys
4
Scan Code 2
5
Scan Code 3
6
Scan Code 4
7
Scan Code 5
8
Scan Code 6