diff --git a/src/MultiReport/ConsumerControl.cpp b/src/MultiReport/ConsumerControl.cpp index dc6876cb..38616e95 100644 --- a/src/MultiReport/ConsumerControl.cpp +++ b/src/MultiReport/ConsumerControl.cpp @@ -44,11 +44,12 @@ static const uint8_t _hidMultiReportDescriptorConsumer[] PROGMEM = { }; ConsumerControl_::ConsumerControl_(void) { - static HIDSubDescriptor node(_hidMultiReportDescriptorConsumer, sizeof(_hidMultiReportDescriptorConsumer)); - HID().AppendDescriptor(&node); } void ConsumerControl_::begin(void) { + static HIDSubDescriptor node(_hidMultiReportDescriptorConsumer, sizeof(_hidMultiReportDescriptorConsumer)); + HID().AppendDescriptor(&node); + // release all buttons end(); } diff --git a/src/MultiReport/Keyboard.cpp b/src/MultiReport/Keyboard.cpp index 453af3cb..caeb1a18 100644 --- a/src/MultiReport/Keyboard.cpp +++ b/src/MultiReport/Keyboard.cpp @@ -79,11 +79,12 @@ static const uint8_t _hidMultiReportDescriptorKeyboard[] PROGMEM = { }; Keyboard_::Keyboard_(void) { - static HIDSubDescriptor node(_hidMultiReportDescriptorKeyboard, sizeof(_hidMultiReportDescriptorKeyboard)); - HID().AppendDescriptor(&node); } void Keyboard_::begin(void) { + static HIDSubDescriptor node(_hidMultiReportDescriptorKeyboard, sizeof(_hidMultiReportDescriptorKeyboard)); + HID().AppendDescriptor(&node); + // Force API to send a clean report. // This is important for and HID bridge where the receiver stays on, // while the sender is resetted. diff --git a/src/MultiReport/SystemControl.cpp b/src/MultiReport/SystemControl.cpp index 7c98acff..d4a57246 100644 --- a/src/MultiReport/SystemControl.cpp +++ b/src/MultiReport/SystemControl.cpp @@ -45,11 +45,12 @@ static const uint8_t _hidMultiReportDescriptorSystem[] PROGMEM = { }; SystemControl_::SystemControl_(void) { - static HIDSubDescriptor node(_hidMultiReportDescriptorSystem, sizeof(_hidMultiReportDescriptorSystem)); - HID().AppendDescriptor(&node); } void SystemControl_::begin(void) { + static HIDSubDescriptor node(_hidMultiReportDescriptorSystem, sizeof(_hidMultiReportDescriptorSystem)); + HID().AppendDescriptor(&node); + // release all buttons end(); }