aboutsummaryrefslogtreecommitdiffstats
path: root/tests/keycode_string/test.mk
diff options
context:
space:
mode:
authorPascal Getreuer2025-03-19 20:45:56 +0100
committerGitHub2025-03-19 20:45:56 +0100
commit3484f0a0dffd264ae3bef70ce2a8961489c16f50 (patch)
tree6c9611c3510dc970fd586ee7bc61d9e0265bfd2d /tests/keycode_string/test.mk
parent40a446a0ec1f2f7cb8c52538bfefb1b26c951dd4 (diff)
[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 2a2771068c7ee545ffac4103aa07e847a9ec3816. * Revert "Attempt at simplifying interface." This reverts commit 8eaf67de76e75bc92d106a8b0decc893fbc65fa5. * 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>
Diffstat (limited to 'tests/keycode_string/test.mk')
-rw-r--r--tests/keycode_string/test.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/keycode_string/test.mk b/tests/keycode_string/test.mk
new file mode 100644
index 0000000000..aa255a1b6b
--- /dev/null
+++ b/tests/keycode_string/test.mk
@@ -0,0 +1,22 @@
+# Copyright 2025 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+EXTRAKEY_ENABLE = yes
+KEYCODE_STRING_ENABLE = yes
+KEY_LOCK_ENABLE = yes
+MAGIC_ENABLE = yes
+MOUSEKEY_ENABLE = yes
+PROGRAMMABLE_BUTTON_ENABLE = yes
+SECURE_ENABLE = yes
+SWAP_HANDS_ENABLE = yes