qmk_firmware/builddefs
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
..
docsgen Bump vite from 5.2.14 to 5.4.12 in /builddefs/docsgen (#24852) 2025-01-30 06:20:08 +11:00
build_full_test.mk Add pointing tests (#24513) 2024-11-23 16:34:32 +00:00
build_json.mk QMK Userspace (#22222) 2023-11-28 07:53:43 +11:00
build_keyboard.mk [Cleanup] Handling of optional *.mk files (#24952) 2025-02-28 17:39:43 +00:00
build_layout.mk QMK Userspace (#22222) 2023-11-28 07:53:43 +11:00
build_test.mk [build_test] set CONSOLE_ENABLE=yes if DEBUG > 0 (#23097) 2024-07-04 00:15:44 +01:00
common_features.mk Implement battery level interface (#24666) 2025-02-28 16:46:14 +11:00
common_rules.mk Remove arm_atsam platform (#24337) 2024-09-02 03:48:17 +01:00
converters.mk Userspace: add support for adding environment variables during build (#22887) 2024-08-12 22:34:22 +10:00
disable_features.mk Remove thermal printer. (#18959) 2022-11-06 00:15:55 +11:00
generic_features.mk [Core] get_keycode_string(): function to format keycodes as strings, for more readable debug logging. (#24787) 2025-03-19 20:45:56 +01:00
message.mk [Feature] Compilation warning if both keymap.json and keymap.c exist (#19939) 2023-09-25 14:17:50 +10:00
show_options.mk Remove RING_BUFFERED_6KRO_REPORT_ENABLE due to disuse. (#24433) 2024-09-24 12:53:55 +01:00
testlist.mk Detect host OS based on USB fingerprint (#18463) 2022-12-09 03:45:30 +11:00