feat: add KLE/Vial <-> [layout] converter and terminal preview - #14
Open
HaoboGu wants to merge 1 commit into
Open
feat: add KLE/Vial <-> [layout] converter and terminal preview#14HaoboGu wants to merge 1 commit into
HaoboGu wants to merge 1 commit into
Conversation
The RMK docs already point at 'rmkit layout' for turning an existing KLE or Vial layout into a keyboard.toml's [layout] section. The conversion engine lives upstream in the rynk-kle crate (which round-trips its output through RMK's own layout builder, so the result is guaranteed to build); this adds the CLI over it: - 'rmkit layout convert <kle|vial.json>' emits the [layout] section, with -o to write a file and --to-vial for the reverse direction - 'rmkit layout show <keyboard.toml|vial.json|kle>' renders the physical layout as box-drawing art: shared borders merge into junctions, two-rect ISO/big-ass Enter keys draw as their union silhouette, encoders get rounded corners, and --variant picks one [[layout.variant]] - CLI tests with golden fixtures (corne, BAlice65, ANSI60 split backspace, raw KLE exports with and without row,col legends) A character grid cannot draw rotation, so rotated keys render axis-aligned with the angle printed inside.
This was referenced Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 2/3 — base #13, review that one first. The diff shown here is only this layer.
The RMK docs already point at
rmkit layoutfor turning an existing KLE or Vial layout into akeyboard.toml's[layout]section. The conversion engine lives upstream in therynk-klecrate (which round-trips its output through RMK's own layout builder, so the result is guaranteed to build); this PR is the CLI over it.showaccepts akeyboard.toml, avial.json, or a raw KLE export (converted on the fly), and--variantpicks one[[layout.variant]]. The renderer draws every box edge into a per-cell direction bitmask, so shared borders merge into proper junctions, two-rect ISO / big-ass Enter keys draw as their union silhouette, and encoders get rounded corners. A character grid cannot draw rotation, so rotated keys render axis-aligned with the angle printed inside.Tests: unit snapshots for the renderer plus CLI integration tests against golden fixtures (corne, BAlice65, ANSI60 split backspace, and raw KLE exports with and without
row,collegends). Regenerate the goldens with the loop in the comment aboveconverted_toml_fixtures_are_up_to_date.rynk-kleis git-pinned to the same commit asrmk-config; both need publishing before rmkit can be released.