diff --git a/src/BootKeyboard/BootKeyboard.cpp b/src/BootKeyboard/BootKeyboard.cpp index dd4b6156..254c9107 100644 --- a/src/BootKeyboard/BootKeyboard.cpp +++ b/src/BootKeyboard/BootKeyboard.cpp @@ -119,6 +119,11 @@ int BootKeyboard_::getDescriptor(USBSetup& setup) { void BootKeyboard_::begin() { + // Force API to send a clean report. + // This is important for and HID bridge where the receiver stays on, + // while the sender is resetted. + releaseAll(); + sendReport(); } diff --git a/src/DeviceAPIs/AbsoluteMouseAPI.hpp b/src/DeviceAPIs/AbsoluteMouseAPI.hpp index 48e615a7..21bb1f58 100644 --- a/src/DeviceAPIs/AbsoluteMouseAPI.hpp +++ b/src/DeviceAPIs/AbsoluteMouseAPI.hpp @@ -54,6 +54,8 @@ int16_t AbsoluteMouseAPI::qadd16(int16_t base, int16_t increment) { } void AbsoluteMouseAPI::begin() { + // release all buttons + end(); } void AbsoluteMouseAPI::end() { diff --git a/src/MultiReport/ConsumerControl.cpp b/src/MultiReport/ConsumerControl.cpp index ffada2b7..0cb4c2f5 100644 --- a/src/MultiReport/ConsumerControl.cpp +++ b/src/MultiReport/ConsumerControl.cpp @@ -50,6 +50,8 @@ ConsumerControl_::ConsumerControl_() { } void ConsumerControl_::begin() { + // release all buttons + end(); } void ConsumerControl_::end() { diff --git a/src/MultiReport/Gamepad.cpp b/src/MultiReport/Gamepad.cpp index d533ff72..7b0774c0 100644 --- a/src/MultiReport/Gamepad.cpp +++ b/src/MultiReport/Gamepad.cpp @@ -81,6 +81,8 @@ Gamepad_::Gamepad_() { } void Gamepad_::begin() { + // release all buttons + end(); } void Gamepad_::end() { diff --git a/src/MultiReport/Keyboard.cpp b/src/MultiReport/Keyboard.cpp index 8cd8de4f..ee3baf1e 100644 --- a/src/MultiReport/Keyboard.cpp +++ b/src/MultiReport/Keyboard.cpp @@ -84,6 +84,10 @@ Keyboard_::Keyboard_() { } void Keyboard_::begin() { + // Force API to send a clean report. This is important for and HID bridge + // where the receiver stays on, while the sender is resetted. + releaseAll(); + sendReportUnchecked(); } diff --git a/src/MultiReport/Mouse.cpp b/src/MultiReport/Mouse.cpp index ca4bdf71..dd3cec6e 100644 --- a/src/MultiReport/Mouse.cpp +++ b/src/MultiReport/Mouse.cpp @@ -74,6 +74,7 @@ Mouse_::Mouse_() { } void Mouse_::begin() { + end(); } void Mouse_::end() { diff --git a/src/MultiReport/SystemControl.cpp b/src/MultiReport/SystemControl.cpp index 7385b320..93cdffd5 100644 --- a/src/MultiReport/SystemControl.cpp +++ b/src/MultiReport/SystemControl.cpp @@ -51,6 +51,8 @@ SystemControl_::SystemControl_() { } void SystemControl_::begin() { + // release all buttons + end(); } void SystemControl_::end() {