From 4c08241d05a52c72b50a0e44448b41e854a915e8 Mon Sep 17 00:00:00 2001 From: Pascal Getreuer Date: Sat, 11 Jan 2025 16:27:17 -0800 Subject: [PATCH] Add KC_NUHS, KC_NUBS, and KC_CAPS. --- quantum/keycode_string.c | 5 ++++- tests/keycode_string/test_keycode_string.cpp | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/quantum/keycode_string.c b/quantum/keycode_string.c index 9e84b19cf5c..369065936a8 100644 --- a/quantum/keycode_string.c +++ b/quantum/keycode_string.c @@ -25,6 +25,7 @@ typedef int_fast8_t index_t; // clang-format off /** Names of some common keycodes. */ static const keycode_string_name_t keycode_names[] = { + KEYCODE_STRING_NAME(KC_TRNS), KEYCODE_STRING_NAME(KC_ENT), KEYCODE_STRING_NAME(KC_ESC), KEYCODE_STRING_NAME(KC_BSPC), @@ -35,12 +36,14 @@ static const keycode_string_name_t keycode_names[] = { KEYCODE_STRING_NAME(KC_LBRC), KEYCODE_STRING_NAME(KC_RBRC), KEYCODE_STRING_NAME(KC_BSLS), + KEYCODE_STRING_NAME(KC_NUHS), KEYCODE_STRING_NAME(KC_SCLN), KEYCODE_STRING_NAME(KC_QUOT), KEYCODE_STRING_NAME(KC_GRV), KEYCODE_STRING_NAME(KC_COMM), KEYCODE_STRING_NAME(KC_DOT), KEYCODE_STRING_NAME(KC_SLSH), + KEYCODE_STRING_NAME(KC_CAPS), KEYCODE_STRING_NAME(KC_INS), KEYCODE_STRING_NAME(KC_HOME), KEYCODE_STRING_NAME(KC_PGUP), @@ -51,7 +54,7 @@ static const keycode_string_name_t keycode_names[] = { KEYCODE_STRING_NAME(KC_LEFT), KEYCODE_STRING_NAME(KC_DOWN), KEYCODE_STRING_NAME(KC_UP), - KEYCODE_STRING_NAME(KC_TRNS), + KEYCODE_STRING_NAME(KC_NUBS), #ifdef EXTRAKEY_ENABLE KEYCODE_STRING_NAME(KC_WBAK), KEYCODE_STRING_NAME(KC_WFWD), diff --git a/tests/keycode_string/test_keycode_string.cpp b/tests/keycode_string/test_keycode_string.cpp index 1d7fb6b6e90..781b5b72b75 100644 --- a/tests/keycode_string/test_keycode_string.cpp +++ b/tests/keycode_string/test_keycode_string.cpp @@ -42,12 +42,17 @@ TEST_F(KeycodeStringTest, get_keycode_string) { }; for (const auto [keycode, expected] : std::vector({ {KC_TRNS, "KC_TRNS"}, + {KC_ESC, "KC_ESC"}, {KC_A, "KC_A"}, {KC_Z, "KC_Z"}, {KC_0, "KC_0"}, {KC_9, "KC_9"}, {KC_KP_0, "KC_KP_0"}, {KC_KP_9, "KC_KP_9"}, + {KC_LBRC, "KC_LBRC"}, + {KC_NUHS, "KC_NUHS"}, + {KC_NUBS, "KC_NUBS"}, + {KC_CAPS, "KC_CAPS"}, {DB_TOGG, "DB_TOGG"}, {KC_LCTL, "KC_LCTL"}, {KC_LSFT, "KC_LSFT"},