kmk_firmware
kmk_firmware copied to clipboard
GUI keyboard layout editor
As simple as it sounds, a gui tool to make things easier. Still trying to decide if it would be a native app or web app.
"As simple as it sounds"
Tools like this are anything but easy with all the keyboards that exist out there.
Wouldn't a converter from QMK to KMK make more sense? It will attract more people (no idea what this actually means in code effort)
That'd be doable with a C AST parser (or I guess, C preprocessor parser, since QMK's user-facing stuff is almost entirely implemented with preprocessor macros), or by figuring out a way to convert QMK Configurator's keymap.json
output into Python source (via AST or via plain old print()
) with as many keycodes preserved as possible, yeah
well using the C preprocessor is fairly easy - abusing the AST is definitely not. I'll dig in deeper when the time comes (months?) and report back
It's not in the gui state yet, but I did start on a translator for the qmk configurator json output, which prints a kmk keymap. https://github.com/pullenrc/kmk_firmware/tree/master/qmk_parser
When KMK was started, we were told by the core devs that JSON support was coming, but we didn't built it into the core. Maybe it would be reasonable to build in support for us to bring this functionality to core through a module/extension once we merge in this branch?
https://github.com/KMKfw/kmk_firmware/tree/topic-merge-keyboard-and-state-rebased
Open to thoughts on this.
We finally have a for-realsies tracking PR for vNext
(as some would call it), in #207. Let's definitely get that merged before taking this on, just for sake of staying focused and having one target to build against.
Since my track record on FOSS stuff for the past ~18 months has been absolutely shit, I don't want to overpromise - I have a bunch of other hobbies and just general things in life going on right now - but I would love to either provide a helping set of eyes or hands if needed, or at least a review on a PR, for this functionality - it would be a huge boon to folks making the jump to KMK.
I poked at your branch @pullenrc and it looks like a really good starting point. My only notable piece of feedback so far is: since that script appears to run on PC using Unix Python (based on the shebang), we can use much beefier libraries than Micro/Circuit Python offer - rather than printing raw characters to a file, we could get into building a proper AST that can be printed, or pretty printed, which would be less fragile.
Has anyone made any significant headway on this? Im thinking of writing a module that would convert qmk json layouts to kmk layouts but I dont want to put energy into something someone else has worked on.
Check my GitHub(pullenrc), I have a basic command line keymap parser, not all keys are done, and it does just the key map. Feel free to fork if you find it helpful. I have had thoughts of going the GUI route, it will just be a standalone python app when I do, and I know that is t the direction the dev want to go.
Ryan Pullen
On Aug 24, 2021, at 4:35 PM, Maxwell Warsaw @.***> wrote:
Has anyone made any significant headway on this? Im thinking of writing a module that would convert qmk json layouts to kmk layouts but I dont want to put energy into something someone else has worked on.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FKMKfw%2Fkmk_firmware%2Fissues%2F91%23issuecomment-904993058&data=04%7C01%7C%7C3b4cad29487d4500602d08d967471ee8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637654377420346996%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=AJ4VdMViOno0WHmE5f1qC8NM5jVUNqEYBKuel9pXxsk%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAECVVV2BGTVLEAD4BDBZPK3T6QGCZANCNFSM4GGIMX5Q&data=04%7C01%7C%7C3b4cad29487d4500602d08d967471ee8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637654377420346996%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=dYiWr%2FVoEcRkpa81E0YVUYrWv9aVCV7GH19palLBrk4%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7C3b4cad29487d4500602d08d967471ee8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637654377420356950%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7W35s5iJ5HvUemzBgmBlQpty3ubmzkNbbNoqszKyIJ4%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26utm_campaign%3Dnotification-email&data=04%7C01%7C%7C3b4cad29487d4500602d08d967471ee8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637654377420356950%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=CGMuMJjnzJdJgzfNQQrUKvcabGiap0m1lpwnLqhdjTI%3D&reserved=0.
Adding a note here that https://getpeg.xyz is closed source, but is in open beta for those that have been interested in this topic and don't care about open source. I'd be happy to see an open source option, but more options for users is good IMHO
I know this discussions has been here for a while but I recently started working on a gui tool for kmk that is open source.
It has its own json data file format similar to a qmk info.json and ships with a helper file handles importing configs from the json file from the code.py. it does make some decisions on how to structure the firmware files but it only writes them once (with exception of the keymap.py and json file) so you can configure anything else on it by hand if you like.
I'm currently working on adding update via serial support as a module so the drive doesnt need to be mounted to update the config or keymap.
Any feedback is welcome you can find the builds for mac win and linux here https://github.com/JanLunge/pog
With tools like Pog https://github.com/JanLunge/pog] and Peg https://github.com/boardsource/Peg existing in a fully open source state, I feel this should be closed. Glad to see these tools exist.