zmkfirmware / zmk

ZMK Firmware Repository
https://zmk.dev/
MIT License
2.55k stars 2.6k forks source link

[Feature Request] Separated Keymap Updating over UF2 DFU #2192

Open myst729 opened 5 months ago

myst729 commented 5 months ago

Given that ZMK supports UF2 firmware update, is it possible to just drag a keymap file (YAML, JSON or whatever, even plain TXT) under its DFU mode? For example:

<
&kp N1  &kp N2  &kp N3
&kp Q   &kp W   &kp E
&kp A   &kp S   &mo 1
>
<
&kp F1  &kp F2  &kp F3
&kp Z   &kp X   &kp C
&kp ESC &kp TAB &trans
>

For ZMK users who don't know coding at all and cannot setup a zmk-config repo on GitHub, this could really help. On ZMK side, I guess this might be less cost than implementing a realtime keymap updating solution, or integrating VIA/VIAL.

Users need to learn the concept of keycodes and compose their own keymap file. It's the same as the zmk-config approach. However this can be improved in a more user friendly way, such as a single web page in the browser (one page SaaS).

elpekenin commented 5 months ago

In my opinion, setting up a fork of zmk-config is quite trivial, so im unsure how useful this would be to end users.

  1. Still need to write your keymap using ZMK's syntax
  2. If you need to jump into bootloader to drop the new bindings, might as well drop the UF2 compiled by GitHub Actions.

Anyway, as per the idea suggested... Copying a file onto the UF2 "fake" storage is not a moment/place where ZMK can run any logic, as it is part of the bootloader program.

Even in the scenario where the bootloader would parse such file, it would still be quite a lot of work (or even impossible) to get the contents of the file written into the datastructure(s) that ZMK uses for storing keymap/behavior information.

Also, there is "ZMK Studio" in the works, which would be a VIA-like tool (along other features?)

myst729 commented 5 months ago
  1. Still need to write your keymap using ZMK's syntax

A one page SaaS would greatly help, as https://kbfirmware.com/ for QMK.

Also, there is "ZMK Studio" in the works, which would be a VIA-like tool (along other features?)

I know this project. It looks like in an "onhold" status. Any inside information or ETA? 🥹

joelspadin commented 4 months ago

Pete is currently working on this. There's more discussion about it on the discord server, but https://github.com/zmkfirmware/zmk/issues/2186 is the latest update. No ETA yet, because it will be a lot of work.