kmk_firmware icon indicating copy to clipboard operation
kmk_firmware copied to clipboard

Create QMK Config Reader

Open Allstreamer opened this issue 2 years ago • 1 comments

I'm gonna work on making a parser for QMK configurator JSON files:

I'm thinking the API should look like this:

from kmk.kmk_keyboard import KMKKeyboard
from kmk.converters.qmk import read_qmk_config

keyboard = KMKKeyboard()

keyboard.keymap = read_qmk_config("config.json")

if __name__ == '__main__':
    keyboard.go()

Discussion that started this on zulipchat

TODO List:

  • [ ] Normal Keys
  • [ ] "Quantum" / Layer Keys
  • [ ] Mod keys
  • [ ] RGB Keys
  • [ ] Version Checking?

Allstreamer avatar Aug 23 '23 14:08 Allstreamer

Hey I have been working on something similar thought you should know. Maybe I can save you some work you can feel free to take any of it or none of it.

https://github.com/boardsource/peg_kmk_firmware/blob/master/src/kmk/json_keymap.py

https://github.com/boardsource/peg_kmk_firmware/blob/master/src/kmk/json_keyboard.py

https://github.com/boardsource/peg_kmk_firmware/blob/master/src/kmk/json_boot.py

These are the 3 files that I have been working on I still need to add tests and write docs.

This works by puting both a QMK info.json and keymap.json in one file.

My work does increase boot time quite a bit about 2 seconds.

daysgobye avatar Oct 14 '23 02:10 daysgobye