From e25b1cb912b038a645018a9f1fd31d0b1c710fe2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sun, 26 Feb 2017 01:52:18 +0100 Subject: [PATCH] Make mouse keys work by zeroing the mouse report at the beginning of updating USB reports. Rename UsbMouseAction() to usbMouseAction() --- right/src/action.c | 9 ++++++++- right/src/usb_interface_mouse.c | 20 ++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/right/src/action.c b/right/src/action.c index 5dadc5c..3eddfcb 100644 --- a/right/src/action.c +++ b/right/src/action.c @@ -69,7 +69,14 @@ void HandleMouseKey(key_action_t action) } void HandleKeyboardEvents() { - int scancodeIdx = 0; + + UsbMouseReport.buttons = 0; + UsbMouseReport.x = 0; + UsbMouseReport.y = 0; + UsbMouseReport.wheelX = 0; + UsbMouseReport.wheelY = 0; + + uint8_t scancodeIdx = 0; activeLayer = LAYER_ID_BASE; for (uint8_t slotId=0; slotId