From a0c7f407e841d7450f5bdcb462055ce9498cad45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Tue, 10 Jan 2017 01:07:51 +0100 Subject: [PATCH] Reset the USB keyboard report with a single bzero() call. --- right/src/usb_interface_keyboard.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/right/src/usb_interface_keyboard.c b/right/src/usb_interface_keyboard.c index b6aec39..9367565 100644 --- a/right/src/usb_interface_keyboard.c +++ b/right/src/usb_interface_keyboard.c @@ -55,9 +55,7 @@ void SwitchActiveUsbKeyboardReport() void ResetActiveUsbKeyboardReport() { - ActiveUsbKeyboardReport->modifiers = 0; - ActiveUsbKeyboardReport->reserved = 0; - bzero(ActiveUsbKeyboardReport->scancodes, USB_KEYBOARD_MAX_KEYS); + bzero(ActiveUsbKeyboardReport, USB_KEYBOARD_REPORT_LENGTH); } void UsbKeyboadTask()