| Module | getreuer/keycode_string |
| Version | 2025-03-07 |
| Maintainer | Pascal Getreuer (@getreuer) |
| License | Apache 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. Keycode String is now a QMK core feature.
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.