qmk/modules/getreuer/keycode_string
2025-03-18 22:27:19 +01:00
..
introspection.h import https://github.com/getreuer/qmk-modules.git 2025-03-18 22:27:19 +01:00
keycode_string.c import https://github.com/getreuer/qmk-modules.git 2025-03-18 22:27:19 +01:00
keycode_string.h import https://github.com/getreuer/qmk-modules.git 2025-03-18 22:27:19 +01:00
qmk_module.json import https://github.com/getreuer/qmk-modules.git 2025-03-18 22:27:19 +01:00
README.md import https://github.com/getreuer/qmk-modules.git 2025-03-18 22:27:19 +01:00

Keycode String

Modulegetreuer/keycode_string
Version2025-03-07
MaintainerPascal Getreuer (@getreuer)
LicenseApache 2.0
Documentation https://getreuer.info/posts/keyboards/keycode-string

This is a community module adaptation of Keycode String, a utility to convert QMK keycodes to human-readable strings. It's much nicer to read names like "LT(2,KC_D)" than numerical codes like "0x4207."

Add the following to your keymap.json:

{
    "modules": ["getreuer/keycode_string"]
}

Then use get_keycode_string(keycode) like:

dprintf("kc=%s\n", get_keycode_string(keycode));

Many common QMK keycodes are understood out of the box by get_keycode_string(), but not all. Optionally, use KEYCODE_STRING_NAMES_USER in keymap.c to define names for additional keycodes or override how any keycode is formatted.

See the Keycode String documentation for further details.