It's not that uncommon to have more than three HID interfaces in a
USB device - even an Arduino Leonardo (or Pro Micro) always has
two just for the CDC; if you add a Boot Keyboard HID interface and
one generic HID interface for consumer control (multimedia) keys
you already have four..
Many commercial gaming keyboards also have more then three interfaces
(I don't think they really need that many but it is what it is).
This is needed as the in and out endpoint are defined as follows:
static const uint8_t epInterruptInIndex = 1; // InterruptIN endpoint index
static const uint8_t epInterruptOutIndex = 2; // InterruptOUT endpoint index
And maxEpPerInterface is set to 2.
See: https://travis-ci.org/felis/USB_Host_Shield_2.0/jobs/569260660
The following collisions resolved:
hid.h -> usbhid.h
hid.cpp -> usbhid.cpp
HID -> USBHID
HID_BOOT_PROTOCOL -> USB_HID_BOOT_PROTOCOL
HID_PROTOCOL_NONE -> USB_HID_PROTOCOL_NONE
HID_PROTOCOL_KEYBOARD -> USB_HID_PROTOCOL_KEYBOARD
HID_PROTOCOL_MOUSE -> USB_HID_PROTOCOL_MOUSE
As a result, it's possible to use the library together with Arduino's bundled HID / Mouse / Keyboard libraries (Leonardo, Micro, or Due).
https://www.arduino.cc/en/Reference/MouseKeyboard