|
@@ -2,7 +2,8 @@
|
|
|
|
|
|
|
|
Control the RGB lighting on QMK-compatible keyboards. Any keyboard running QMK with a
|
|
Control the RGB lighting on QMK-compatible keyboards. Any keyboard running QMK with a
|
|
|
lighting channel and VIA support is driven; the Impact 80's effect names are built in,
|
|
lighting channel and VIA support is driven; the Impact 80's effect names are built in,
|
|
|
-every other board's are fetched with `keyboard fetch`.
|
|
|
|
|
|
|
+every other board's are fetched with `keyboard fetch`, and a board with no
|
|
|
|
|
+definition file gets one written with `keyboard definitions generate`.
|
|
|
|
|
|
|
|
Cross-platform CLI for Linux, macOS, and Windows. Designed for automation, scripting, and agent consumption.
|
|
Cross-platform CLI for Linux, macOS, and Windows. Designed for automation, scripting, and agent consumption.
|
|
|
|
|
|
|
@@ -499,11 +500,88 @@ Error: the VIA definition for GMMK Pro names no effects, so no effect name can b
|
|
|
names are not in the file, and an effect is set by number with `effect <zone> <index>`
|
|
names are not in the file, and an effect is set by number with `effect <zone> <index>`
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
-`0 effects` next to a saved definition is that answer, not a failed fetch. The 45
|
|
|
|
|
-names are public, and this tool does not fall back to them: a transcribed list is
|
|
|
|
|
-the second copy of a name a per-board file exists to be, and the spellings do not
|
|
|
|
|
-line up anyway — `All Off` and `Band Sat.` reach neither `none` nor `band_sat`.
|
|
|
|
|
-See [Compatibility Aliases](#compatibility-aliases) for what such a board accepts.
|
|
|
|
|
|
|
+`0 effects` next to a saved definition is that answer, not a failed fetch.
|
|
|
|
|
+
|
|
|
|
|
+## Where Effect Names Cannot Come From
|
|
|
|
|
+
|
|
|
|
|
+**No programmatic, deterministic way has been found or documented to learn the
|
|
|
|
|
+spelling of an effect for a keyboard whose manufacturer never wrote one down.**
|
|
|
|
|
+That is the state of the art as of 2026-10-01, and this tool does not paper over
|
|
|
|
|
+it. Every route was measured rather than assumed:
|
|
|
|
|
+
|
|
|
|
|
+| Route | Effect IDs | Effect names |
|
|
|
|
|
+|---|---|---|
|
|
|
|
|
+| The board's own definition file | 161 of 2029 files in VIA's collection | yes |
|
|
|
|
|
+| VIA's built-in menu, if the file is pinned | the 947 files naming one | yes, 45 positions |
|
|
|
|
|
+| Writing above the top and reading back the clamp | yes, 4 round trips per channel | no |
|
|
|
|
|
+| A firmware `.bin`, read for its string table | — | **no: 0 names** |
|
|
|
|
|
+| The most-used spelling per ID across all files | no | **no: 95 of 122 are one vendor** |
|
|
|
|
|
+| The QMK version the firmware was built from | no | no |
|
|
|
|
|
+| Vial's `vialrgb_get_supported` | yes, with `VIALRGB_ENABLE` | no, the GUI holds them |
|
|
|
|
|
+| QMK XAP | not merged; dormant since 2023 | — |
|
|
|
|
|
+
|
|
|
|
|
+Two of those are worth spelling out, because they are the ones that look like
|
|
|
|
|
+they should work.
|
|
|
|
|
+
|
|
|
|
|
+**The firmware image holds no names.** The Impact 80's own `impact_80.bin`, 76 KB
|
|
|
|
|
+of Cortex-M Thumb code, has 735 strings of four characters or more and not one
|
|
|
|
|
+readable word among them. The names are consumed by the preprocessor to build an
|
|
|
|
|
+enum and never emitted, because the firmware has no use for them — it speaks
|
|
|
|
|
+numbers. A `.bin` can be disassembled to recover *how many* effects are compiled
|
|
|
|
|
+in, which is the one number a clamp already returns in four round trips, and it
|
|
|
|
|
+carries no name for any of them.
|
|
|
|
|
+
|
|
|
|
|
+**A majority vote over the collection is not a name.** Of the 122 definitions in
|
|
|
|
|
+VIA's collection that file an `rgb_matrix` effect list, 95 are Keychron's, so the
|
|
|
|
|
+most-used spelling of nearly every ID is one manufacturer's house style rather
|
|
|
|
|
+than a community consensus. And where definitions disagree, they disagree about
|
|
|
|
|
+*which effect* a number is, not how to spell it: ID 7 is `rainbow_moving_chevron`
|
|
|
|
|
+on 95 boards and `cycle_out_in` on 8. Those are different effects. There is no
|
|
|
|
|
+majority to compute, because there is no shared referent.
|
|
|
|
|
+
|
|
|
|
|
+**What is answerable is the slots.** Writing above the top and reading back what
|
|
|
|
|
+the firmware kept gives the highest ID a channel takes, because QMK clamps rather
|
|
|
|
|
+than rejects — `quantum/rgb_matrix/rgb_matrix.c` maps a mode at or above
|
|
|
|
|
+`RGB_MATRIX_EFFECT_MAX` down to `EFFECT_MAX - 1`. So a board with no names can
|
|
|
|
|
+still be told how many effects it has, and an effect set by number works on it
|
|
|
|
|
+today.
|
|
|
|
|
+
|
|
|
|
|
+### Naming Them Yourself
|
|
|
|
|
+
|
|
|
|
|
+`keyboard definitions generate` is what a board with no definition file is for.
|
|
|
|
|
+It asks the keyboard how many effect IDs each channel takes, writes a definition
|
|
|
|
|
+with one **unnamed** option per slot, and writes the spellings other keyboards'
|
|
|
|
|
+definitions use for the same numbers into a `.spotted.txt` note beside it.
|
|
|
|
|
+
|
|
|
|
|
+The generated definition names no effect on purpose. A name the tool wrote would
|
|
|
|
|
+be indistinguishable from the manufacturer's, because nothing in a file can be
|
|
|
|
|
+read back off a keyboard to check it — and a wrong name is worse than none, since
|
|
|
|
|
+the tool would then report an effect as set when it has set something else. An
|
|
|
|
|
+option with an empty name is a slot without a name, so the channel reports
|
|
|
|
|
+`0 effects` until a name is filled in, which is the honest state and the one the
|
|
|
|
|
+board was already in. Open the file, write a name into each `options` entry, and
|
|
|
|
|
+the channel resolves from then on.
|
|
|
|
|
+
|
|
|
|
|
+The note carries every candidate with the number of boards that wrote it and the
|
|
|
|
|
+manufacturer behind most of them, because that is what separates a name from a
|
|
|
|
|
+guess:
|
|
|
|
|
+
|
|
|
|
|
+```
|
|
|
|
|
+rgb_matrix (channel 3), IDs 0 to 7
|
|
|
|
|
+ ID 0 seen on 122 boards: none (104), all_off (17), led_off (1) most of them keychron (95)
|
|
|
|
|
+ ID 7 seen on 122 boards: rainbow_moving_chevron (95), cycle_out_in (8), band_val (4) most of them keychron (95)
|
|
|
|
|
+```
|
|
|
|
|
+
|
|
|
|
|
+Those numbers come from `internal/spotted/spotted.json`, generated by
|
|
|
|
|
+`internal/spotted/generate` from a checkout of [VIA's collection](https://github.com/the-via/keyboards)
|
|
|
|
|
+and carrying the commit it was measured from. It is a snapshot of a collection
|
|
|
|
|
+that moves, so a name in it ages; the commit is what says how far.
|
|
|
|
|
+
|
|
|
|
|
+The 45 names of VIA's built-in menu are public, and this tool does not fall back
|
|
|
|
|
+to them: a transcribed list is the second copy of a name a per-board file exists
|
|
|
|
|
+to be, and the spellings do not line up anyway — `All Off` and `Band Sat.` reach
|
|
|
|
|
+neither `none` nor `band_sat`. See [Compatibility Aliases](#compatibility-aliases)
|
|
|
|
|
+for what such a board accepts.
|
|
|
|
|
|
|
|
The other 153 deviate, and not only in how many effects they compile in. MonsGeek's
|
|
The other 153 deviate, and not only in how many effects they compile in. MonsGeek's
|
|
|
M1 uses QMK's enum identifiers and its own 19: `SOLID_COLOR`, `BREATHING`,
|
|
M1 uses QMK's enum identifiers and its own 19: `SOLID_COLOR`, `BREATHING`,
|
|
@@ -882,6 +960,7 @@ board", and that file is gone, so the field would have been unanswerable:
|
|
|
| `qmk-rgb-tool effect <zone>` | With no name, list the effects that zone has; `effect all` lists every channel |
|
|
| `qmk-rgb-tool effect <zone>` | With no name, list the effects that zone has; `effect all` lists every channel |
|
|
|
| `qmk-rgb-tool keyboard fetch` | Download the VIA definition for the connected keyboard. A definition already stored for that board is not replaced, because it may be one you have edited; `--force` overwrites it |
|
|
| `qmk-rgb-tool keyboard fetch` | Download the VIA definition for the connected keyboard. A definition already stored for that board is not replaced, because it may be one you have edited; `--force` overwrites it |
|
|
|
| `qmk-rgb-tool keyboard definitions` | List every definition in use, from the per-user directory and built into the binary, each marked with which it is |
|
|
| `qmk-rgb-tool keyboard definitions` | List every definition in use, from the per-user directory and built into the binary, each marked with which it is |
|
|
|
|
|
+| `qmk-rgb-tool keyboard definitions generate` | Ask the keyboard how many effect IDs each channel takes and write a definition with one **unnamed** option per slot, plus a `.spotted.txt` note naming the spellings other keyboards' definitions use for the same numbers. The names are yours to write in; see [Where Effect Names Cannot Come From](#where-effect-names-cannot-come-from) |
|
|
|
| `qmk-rgb-tool brightness <zone> <val>` | Set brightness (0–255) on the named zones, verified by read-back |
|
|
| `qmk-rgb-tool brightness <zone> <val>` | Set brightness (0–255) on the named zones, verified by read-back |
|
|
|
| `qmk-rgb-tool speed <zone> <val>` | Set effect speed (0–255) on the named zones, verified by read-back; on `logo` and `side` only 0, 1 and 4 are reachable |
|
|
| `qmk-rgb-tool speed <zone> <val>` | Set effect speed (0–255) on the named zones, verified by read-back; on `logo` and `side` only 0, 1 and 4 are reachable |
|
|
|
| `qmk-rgb-tool color <zone> <hex>` | Set color (e.g. `ff0000`) on the named zones |
|
|
| `qmk-rgb-tool color <zone> <hex>` | Set color (e.g. `ff0000`) on the named zones |
|