diff options
| author | Fred Sundvik <fsundvik@gmail.com> | 2017-06-19 00:22:12 +0300 |
|---|---|---|
| committer | Fred Sundvik <fsundvik@gmail.com> | 2017-06-19 00:22:12 +0300 |
| commit | fb9b8dadb97e69f2c206a96e879a9350b535fe98 (patch) | |
| tree | b9165b982613290de8b34dd749d6ac6db3c2b429 /tests | |
| parent | 43d8fa5bf1248ce5c1ce5f9cb0d238d794b4475d (diff) | |
| download | qmk_firmware-fb9b8dadb97e69f2c206a96e879a9350b535fe98.tar.gz qmk_firmware-fb9b8dadb97e69f2c206a96e879a9350b535fe98.zip | |
Add a couple of todos to keyboard_report_util.cpp
Also print the modifier state
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_common/keyboard_report_util.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_common/keyboard_report_util.cpp b/tests/test_common/keyboard_report_util.cpp index 34e53cd4c..aca4433dd 100644 --- a/tests/test_common/keyboard_report_util.cpp +++ b/tests/test_common/keyboard_report_util.cpp | |||
| @@ -47,6 +47,8 @@ bool operator==(const report_keyboard_t& lhs, const report_keyboard_t& rhs) { | |||
| 47 | 47 | ||
| 48 | std::ostream& operator<<(std::ostream& stream, const report_keyboard_t& value) { | 48 | std::ostream& operator<<(std::ostream& stream, const report_keyboard_t& value) { |
| 49 | stream << "Keyboard report:" << std::endl; | 49 | stream << "Keyboard report:" << std::endl; |
| 50 | stream << "Mods: " << value.mods << std::endl; | ||
| 51 | // TODO: This should probably print friendly names for the keys | ||
| 50 | for (uint32_t k: get_keys(value)) { | 52 | for (uint32_t k: get_keys(value)) { |
| 51 | stream << k << std::endl; | 53 | stream << k << std::endl; |
| 52 | } | 54 | } |
| @@ -54,6 +56,7 @@ std::ostream& operator<<(std::ostream& stream, const report_keyboard_t& value) { | |||
| 54 | } | 56 | } |
| 55 | 57 | ||
| 56 | KeyboardReportMatcher::KeyboardReportMatcher(const std::vector<uint8_t>& keys) { | 58 | KeyboardReportMatcher::KeyboardReportMatcher(const std::vector<uint8_t>& keys) { |
| 59 | // TODO: Support modifiers | ||
| 57 | memset(m_report.raw, 0, sizeof(m_report.raw)); | 60 | memset(m_report.raw, 0, sizeof(m_report.raw)); |
| 58 | for (auto k: keys) { | 61 | for (auto k: keys) { |
| 59 | add_key_to_report(&m_report, k); | 62 | add_key_to_report(&m_report, k); |
