From 1e6d0db268a34759b8a0171f390b1a2d6620984f Mon Sep 17 00:00:00 2001 From: PaulStoffregen Date: Sun, 8 Oct 2017 03:37:00 -0700 Subject: [PATCH] Do not let HID parser claim boot protocol keyboards --- hid.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hid.cpp b/hid.cpp index 75f947f..94f855f 100644 --- a/hid.cpp +++ b/hid.cpp @@ -54,6 +54,8 @@ bool USBHIDParser::claim(Device_t *dev, int type, const uint8_t *descriptors, ui println(" bInterfaceClass = ", descriptors[5]); println(" bInterfaceSubClass = ", descriptors[6]); println(" bInterfaceProtocol = ", descriptors[7]); + // do not claim boot protocol keyboards + if (descriptors[6] == 1 && descriptors[7] == 1) return false; // hid interface descriptor uint32_t hidlen = descriptors[9];