USB Gamepad with LEDs using Leonardo

I’m trying to create a gamepad with LEDs using a Leonardo. I’ve been modifying the HID.cpp and USBAPI.h files with any examples I could find. I managed to get the gamepad working following these instructions, and have had a keyboard working with LEDs, using this patch: , but am having a heck of a time creating an HID that works. The buttons and LEDs are seen by my computer, but button presses aren’t being registered.

Does anyone know what changes need to be made for these to work? My HID.cpp and USBAPI.h files are below. Thanks. (7.75 KB)