Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create QMK Config Reader #863

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Allstreamer
Copy link
Contributor

@Allstreamer Allstreamer commented Aug 23, 2023

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?

@daysgobye
Copy link
Collaborator

daysgobye commented Oct 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants