Introduction - If you have any usage issues, please Google them yourself
Micro Chip AN1163 USB HID Class on an Embedded Device
This application note discusses and provides a HID device function driver that can be integrated with almost any application running on Microchip 32-bit PIC® microcontroller products with USB peripheral.
The HID function driver uses the Microchip PIC32 USB device stack.