From 2bc62cb8b93e7086b775ffd61847ef13f3811941 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Fri, 24 Nov 2017 23:20:17 +0100 Subject: [PATCH] hid: Wrap Mouse.releaseAll() and Mouse.sendReport() Built on top of keyboardio/KeyboardioHID#14, required for keyboardio/Kaleidoscope-MouseKeys#10. Signed-off-by: Gergely Nagy --- src/kaleidoscope/hid.cpp | 8 ++++++++ src/kaleidoscope/hid.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/kaleidoscope/hid.cpp b/src/kaleidoscope/hid.cpp index c9f72f8c..9658e0c9 100644 --- a/src/kaleidoscope/hid.cpp +++ b/src/kaleidoscope/hid.cpp @@ -151,6 +151,14 @@ void releaseMouseButtons(uint8_t buttons) { Mouse.release(buttons); } +void releaseAllMouseButtons(void) { + Mouse.releaseAll(); +} + +void sendMouseReport(void) { + Mouse.sendReport(); +} + /** SingleAbsolute mouse (grapahics tablet) events */ void initializeAbsoluteMouse() { diff --git a/src/kaleidoscope/hid.h b/src/kaleidoscope/hid.h index 3fac4cbe..bc5c6844 100644 --- a/src/kaleidoscope/hid.h +++ b/src/kaleidoscope/hid.h @@ -38,6 +38,8 @@ void moveMouse(signed char x, signed char y, signed char wheel); void clickMouseButtons(uint8_t buttons); void pressMouseButtons(uint8_t buttons); void releaseMouseButtons(uint8_t buttons); +void releaseAllMouseButtons(void); +void sendMouseReport(void); void initializeAbsoluteMouse();