keyboardio / KeyboardioHID

A HID library for Arduino
MIT License
34 stars 17 forks source link

BootKeyboard: use positive Logical Maximum #102

Closed tlyu closed 10 months ago

tlyu commented 10 months ago

In a HID Report Descriptor, the correct encoding for Logical Maximum (255) is 26 FF 00, not 25 FF. The latter encodes Logical Maximum (-1). This is a common error, and some hosts rightfully reject it.

(The correct Logical Maximum is probably 221, because otherwise, the modifier keys could also be encoded in the key codes array, which is invalid for their usage type. A lot of production keyboards use 255 anyway, and hosts seem to accept that.)