Skip to content

Conversation

@spidey3
Copy link
Contributor

@spidey3 spidey3 commented Dec 24, 2025

Description

With more use of data-driven configuration, qmk info is becoming a more useful tool.
This change improves it in a few ways:

  • qmk info can now optionally output information in KLE json format (use -f kle). This allows QMK layouts and keymaps to easily be imported into KLE, to create pretty renderings that are driven by the actual QMK key bindings
  • qmk info now uses the QMK keycode database (.../data/constants/keycodes)to source human readable key names.
  • qmk info now uses Unicode and some simple heuristics to create shorter labels for some commonly used key bindings, making them fit better into the rendered output.
  • a minor fix was applied to dmqdesign/spin, to properly mark encoders.

Here are some examples:

qmk info -f kle -kb wuque/ikki68_aurora -km spidey3 > ~/tmp/ikki.json
wuque-studio-ikki68-aurora-layout_68_ansi-spidey3

qmk info -f kle -kb wuque/ikki68_aurora -km spidey3 -m > ~/tmp/ikki_full.json
wuque-studio-ikki68-aurora-layout_68_ansi-spidey3 (1)

Caveats

  • The output is only as good as the data in keyboard.json and keymap.json. If you don't have key location information, or that information is incorrect, then the output is going to be equally incorrect.
  • There are some issues with the placement of rotated key clusters when qmk info -f kle output is loaded into KLE. I suspect that this is a combination of some inconsistent behavior in KLE, and possibly, an issue in qmk kle2json when used to convert KLE output json to QMK. Note the impact of this is low; at present there are only 14 keyboards in the repo that specify rotation.
  • Related to the above, when multiple layouts are rendered with -f kle, the vertical spacing can be incorrect (especially if there are rotated clusters). The problem is that while most things in KLE json are relative positions, rotation origin x/y are absolute locations.

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant