diff options
Diffstat (limited to 'tests/test_common/keyboard_report_util.cpp')
-rw-r--r-- | tests/test_common/keyboard_report_util.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_common/keyboard_report_util.cpp b/tests/test_common/keyboard_report_util.cpp index 18e0574277..5e40323669 100644 --- a/tests/test_common/keyboard_report_util.cpp +++ b/tests/test_common/keyboard_report_util.cpp @@ -19,6 +19,10 @@ #include <vector> #include <algorithm> +extern "C" { +#include "keycode_string.h" +} + using namespace testing; extern std::map<uint16_t, std::string> KEYCODE_ID_TABLE; @@ -72,7 +76,7 @@ std::ostream& operator<<(std::ostream& os, const report_keyboard_t& report) { os << "("; for (auto key = keys.cbegin(); key != keys.cend();) { - os << KEYCODE_ID_TABLE.at(*key); + os << get_keycode_string(*key); key++; if (key != keys.cend()) { os << ", "; @@ -82,7 +86,7 @@ std::ostream& operator<<(std::ostream& os, const report_keyboard_t& report) { os << ") ["; for (auto mod = mods.cbegin(); mod != mods.cend();) { - os << KEYCODE_ID_TABLE.at(*mod); + os << get_keycode_string(*mod); mod++; if (mod != mods.cend()) { os << ", "; |