1
0
Fork 0

Separate 6KRO and NKRO report structs (#22267)

This commit is contained in:
Ryan 2023-10-23 14:43:46 +10:00 committed by GitHub
parent bf6f13a2b0
commit 0c160e1fba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 187 additions and 165 deletions

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);
}
}
}