Separate 6KRO and NKRO report structs (#22267)
This commit is contained in:
parent
bf6f13a2b0
commit
0c160e1fba
20 changed files with 187 additions and 165 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue