Add KC_NUHS, KC_NUBS, and KC_CAPS.

This commit is contained in:
Pascal Getreuer 2025-01-11 16:27:17 -08:00
parent b5613875e5
commit 4c08241d05
2 changed files with 9 additions and 1 deletions

View File

@ -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),

View File

@ -42,12 +42,17 @@ TEST_F(KeycodeStringTest, get_keycode_string) {
};
for (const auto [keycode, expected] : std::vector<TestParams>({
{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"},