USB HID controllers limited to one usage page.

Reading this source…

…makes me think that SDL2 will not support any HID devices that are not in the “Generic Desktop” (0x01) page?

Which means that devices that report under…

  • Simulation Controls Page (0x02)
  • VR Controls Page (0x03)
  • Sport Controls Page (0x04)
  • Game Controls Page (0x05)

…are all ignored as input devices for SDL2?

Is this by design?

Does that mean that fancy vehicle-specific controllers like aileron trim, throttle controller, may not always be supported if they do not report as “Generic Desktop” ?

The reason I am asking: I am making my own custom input device, and I want to properly report per USB specification, but I also want to be compatible with SDL2.

Game Controls Page (0x05) and Multi-axis Controller Page (0x08) are accepted as input devices. Simulation controls, VR controls and sport controls are not considered joysticks and are not reported through the joystick/gamepad API in SDL.

We can change that, but we haven’t had any requests from developers or customers for those types of devices.

Thank you,

Can you point me to the Page 0x05 support?

Because the code I linked does not show that support.

Is it in a different file?


Sorry, I mis-typed. Those are usages, not usage pages. The Game Controls Page is not currently supported. The SDL API doesn’t currently map game actions, it just provides raw buttons and axes or a gamepad abstraction.

1 Like