kmk_firmware icon indicating copy to clipboard operation
kmk_firmware copied to clipboard

GUI keyboard layout editor

Open kdb424 opened this issue 6 years ago • 11 comments

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.

kdb424 avatar Nov 25 '18 22:11 kdb424

"As simple as it sounds"

Tools like this are anything but easy with all the keyboards that exist out there.

klardotsh avatar Nov 25 '18 23:11 klardotsh

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)

dzervas avatar Sep 13 '20 14:09 dzervas

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

klardotsh avatar Sep 14 '20 03:09 klardotsh

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

dzervas avatar Sep 14 '20 20:09 dzervas

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

pullenrc avatar Jun 19 '21 05:06 pullenrc

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.

kdb424 avatar Jun 19 '21 17:06 kdb424

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.

klardotsh avatar Jun 20 '21 07:06 klardotsh

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.

Max585t avatar Aug 24 '21 21:08 Max585t

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.

pullenrc avatar Aug 24 '21 22:08 pullenrc

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

kdb424 avatar Sep 22 '22 00:09 kdb424

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

JanLunge avatar Mar 12 '23 10:03 JanLunge

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.

kdb424 avatar Feb 28 '24 04:02 kdb424