Separate 6KRO and NKRO report structs (#22267)

This commit is contained in:
Ryan authored and GitHub committed 2023-10-23 15:43:46 +11:00
1 parent bf6f13a2b0
commit 0c160e1fba
20 files changed
+187 -165

No files matched your search

+2 -2
View File
@@ -95,12 +95,12 @@ std::ostream& operator<<(std::ostream& os, const report_keyboard_t& report) {
}
KeyboardReportMatcher::KeyboardReportMatcher(const std::vector<uint8_t>& keys) {
memset(m_report.raw, 0, sizeof(m_report.raw));
memset(&m_report, 0, sizeof(report_keyboard_t));
for (auto k : keys) {
if (IS_MODIFIER_KEYCODE(k)) {
m_report.mods |= MOD_BIT(k);
} else {
add_key_to_report(&m_report, k);
add_key_byte(&m_report, k);
}
}
}