diff --git a/driver/razerkbd_driver.c b/driver/razerkbd_driver.c index bb7d05262c970dfdffa307fc9a0b1e27e8789a1d..7157cbce650d2a9b184e5c791c8269704cd676ca 100644 --- a/driver/razerkbd_driver.c +++ b/driver/razerkbd_driver.c @@ -2145,8 +2145,10 @@ static int razer_raw_event(struct hid_device *hdev, struct hid_report *report, u return 0; } - // The event were looking for is 16 bytes long and starts with 0x04 - if(intf->cur_altsetting->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_KEYBOARD && size == 16 && data[0] == 0x04) { + // The event were looking for is 16 or 22 bytes long and starts with 0x04. + // Newer firmware seems to use 22 bytes. + if(intf->cur_altsetting->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_KEYBOARD && + ((size == 22) || (size == 16)) && data[0] == 0x04) { // Convert 04... to 0100... int index = size-1; // This way we start at 2nd last value, does subtract 1 from the 15key rollover though (not an issue cmon) u8 cur_value = 0x00;