SeungheonOh / QMK_KeymapToAsciiTable

Convert QMK keymap file into Comment Ascii Table
MIT License
27 stars 3 forks source link

QMK_KeymapToAsciiTable

QMK_KeymapToAsciiTable is a python script, that automates boring and time consuming task of making ASCII table for your QMK powered keyboard. It gets input from keymap.c QMK format file, in it's directory, make a new file called comment.txt, that contains searched keylayers and of course ASCII table.

This script is based on basic Python, should work in every devices that has Python installed :O

How to use?

  1. put the script file in the same path where your keymap.c file is.
  2. execute the script, it will generate file called comment.txt and KeyboardLayout.json.
  3. If you are using plane Ortho-linear keyboard, You can just open comment.txt, and copy the result.
  4. If you are not Ortho-linear keyboard user and wish to custommize keysizes you can do followings:

    1. Open the KeyboardLayout.json file that have been generated by first time you execute the script.
    2. Type in you keyboard configurations, the keysizes. For example, If you 1st row's first key is 2u, you should fine a part startes with "0" : and change the first Item to 2. Remeber that the first row / key is always 0 not 1. One thing to keep in mind: this script does not support decimals for the KeyboardLyout.json. You should only use integers in it.
    3. Re-run the script, check the re generated comment.txt.

    Structure of `KeyboardLayout.json`

Output samples

Sample 1

Sample 2

What layout is supported?

Basically, any layouts!

How to contribute?

Are you considering to contribute and add helpful features? Thanks! All you have to do is:

Just like other repos, Fork it, and Pull request!

ToDo:

Thanks to...

RionLion100 for inspirations!