qmk_firmware/tests
Pascal Getreuer 3484f0a0df
[Core] get_keycode_string(): function to format keycodes as strings, for more readable debug logging. (#24787)
* keycode_string(): Format keycodes as strings.

This adds the `keycode_string()` function described in
https://getreuer.info/posts/keyboards/keycode-string/index.html
as a core feature.

* Fix formatting.

* keycode_string review revisions.

* Rename keycode_string() -> get_keycode_string() for consistency with
  existing string utils like get_u8_str().

* Revise custom keycode names with separate _user and _kb tables.

* Correct indent in builddefs/generic_features.mk.

Co-authored-by: Ryan <fauxpark@gmail.com>

* Add KC_NUHS, KC_NUBS, and KC_CAPS.

* Fix linking error with custom names.

* Attempt at simplifying interface.

* Formatting fix.

* Several fixes and revisions.

* Don't use PSTR in KEYCODE_STRING_NAME, since this fails to build on
  AVR. Store custom names in RAM.
* Revise the internal table of common keycode names to use its own
  storage representation, still in PROGMEM, and now more efficiently
  stored flat in 8 bytes per entry.
* Support Swap Hands keycodes and a few other keycodes.

* Revert "Formatting fix."

This reverts commit 2a2771068c.

* Revert "Attempt at simplifying interface."

This reverts commit 8eaf67de76.

* Simplify custom names API by sigprof's suggestion.

* Support more keycodes.

* Add QK_LOCK keycode.
* Add Secure keycodes.
* Add Joystick keycodes.
* Add Programmable Button keycodes.
* Add macro MC_ keycodes.
* For remaining keys in known code ranges, stringify them as
  "QK_<feature>+<number>". For instance, "QK_MIDI+7".

* Bug fix and a few improvements.

* Fix missing right-hand bit when displaying 5-bit mods numerically.
* Support KC_HYPR, KC_MEH, HYPR_T(kc), MEH_T(kc).
* Exclude one-shot keycodes when NO_ACTION_ONESHOT is defined.

---------

Co-authored-by: Ryan <fauxpark@gmail.com>
2025-03-19 20:45:56 +01:00
..
audio [Core] Simplify audio_duration_to_ms() and audio_ms_to_duration(), reduce firmware size by a few bytes. (#21427) 2023-07-08 00:47:16 +10:00
auto_shift Improve test invocation, fix Retro Shift bugs, and add Auto+Retro Shift test cases (#15889) 2023-09-25 12:45:49 +10:00
autocorrect Introduce VERIFY_AND_CLEAR shorthand (#19370) 2022-12-18 21:55:14 +01:00
basic Add EOL to non-keyboard files (#24990) 2025-03-06 23:17:51 +00:00
caps_word Ignore space cadet key release when caps word is active (#21721) 2024-01-09 22:07:10 +11:00
combo Add combo key repress feature (#22858) 2024-09-05 23:27:20 -07:00
housekeeping Add housekeeping execution to unit tests (#22999) 2024-05-13 18:15:52 +01:00
keycode_string [Core] get_keycode_string(): function to format keycodes as strings, for more readable debug logging. (#24787) 2025-03-19 20:45:56 +01:00
layer_lock [Core] Add Layer Lock feature (#23430) 2024-11-21 17:31:54 +11:00
leader Refactor Leader key feature (#19632) 2023-02-13 03:19:02 +11:00
mousekeys Add pointing tests (#24513) 2024-11-23 16:34:32 +00:00
no_tapping Add EOL to non-keyboard files (#24990) 2025-03-06 23:17:51 +00:00
pointing Add pointing tests (#24513) 2024-11-23 16:34:32 +00:00
repeat_key [Bug] Fix issue with Repeat Key-Combo test (#21005) 2023-05-20 21:22:46 +01:00
secure Introduce VERIFY_AND_CLEAR shorthand (#19370) 2022-12-18 21:55:14 +01:00
tap_dance Tap dance introspection (#24049) 2024-07-06 00:57:54 +01:00
tap_hold_configurations Retro Tapping Re-Write; Key Roll Fix (#23641) 2025-02-16 20:50:42 +11:00
test_common [CI] Regenerate Files (#24770) 2025-01-01 13:02:16 +11:00
tri_layer [Core] Tri Layer Keys (#19795) 2023-02-12 10:23:07 +11:00
unicode Unicode, Unicodemap and UCIS refactor (#21659) 2023-08-27 13:30:19 +10:00