One Windows, it would probably make sense to use Windows raw input and HidP APIs
Useful headers:
- hidsdi.h
- hidusage.h
- hidpi.h
Useful functions:
RegisterRawInputDevices()
GetRawInputDeviceInfo()
HidP_GetLinkCollectionNodes()
HidP_GetUsages()
HidP_GetScaledUsageValue()
HidP_GetButtonCaps()
HidP_GetValueCaps()
Using these APIs, there is no need to rely on any information about devices hard coded into the "driver" code. Everything needed can be queried using HidP API.