|
|
@@ -1,52 +1,23 @@
|
|
|
# Definitions
|
|
|
|
|
|
-VIA definition files. A keyboard holds effect numbers, not names, and the names
|
|
|
-live in one of these — the same file VIA reads when you open a board in its web
|
|
|
-app, which is why the tool depends on them the way VIA does.
|
|
|
+The VIA definition files built into the binary. `embed.go` embeds every JSON file
|
|
|
+in this directory, so that `go install` delivers them: it copies a binary and
|
|
|
+creates no data directory, and a board VIA does not carry cannot be fetched.
|
|
|
|
|
|
-## What belongs here
|
|
|
-
|
|
|
-One JSON file per keyboard, and a file is used for the board whose
|
|
|
-`vendorId`/`productId` it carries, so the name of the file does not matter. A
|
|
|
-file for another board is refused by name rather than used, because applying one
|
|
|
-board's effect names to another board writes wrong IDs.
|
|
|
+This is not the directory the tool reads at runtime. That is the per-user
|
|
|
+`definitions/` directory the top-level README names; `definition fetch` writes
|
|
|
+there, and a file placed there — or passed with `--definition` — takes precedence
|
|
|
+over the one built in. To use or correct a definition, put it there, not here.
|
|
|
|
|
|
-`qmk-rgb-tool definition fetch` puts a file here for the connected keyboard.
|
|
|
-Drop one in by hand when the vendor publishes one and VIA does not carry it.
|
|
|
+## What belongs here
|
|
|
|
|
|
-This is the repository's own copy, and it is the one built into the binary. At
|
|
|
-runtime the tool reads the per-user `definitions/` directory instead — the table
|
|
|
-in the top-level README names it — so a file you fetch is found, and a file you
|
|
|
-want to correct the built-in copy with goes there.
|
|
|
+A board's file, only when VIA's own collection does not carry that board, kept as
|
|
|
+the vendor serves it. A file is matched to a board by the `vendorId`/`productId`
|
|
|
+it carries, so its name does not matter. A file added here takes effect after a
|
|
|
+rebuild.
|
|
|
|
|
|
## The files here
|
|
|
|
|
|
| File | Board | From |
|
|
|
|------|-------|------|
|
|
|
| `impact80.json` | Wobkey Impact 80 | [the vendor's Driver & Firmware page](https://wiki.wobkey.com/en/Products/PMOKEY-Impact-80/Driver-Firmware), which links it as the Impact 80 VIA JSON |
|
|
|
-
|
|
|
-Wobkey's file is the vendor's own, kept as it is served. It names three lighting
|
|
|
-channels — `logo`, `Backlight`, `side` — and their effect lists: 7, 46 and 7
|
|
|
-entries, IDs 0 to 6, 0 to 45 and 0 to 6.
|
|
|
-
|
|
|
-This board is **not** in VIA's own collection, so `definition fetch` cannot get
|
|
|
-it. That is why the file is here rather than fetched.
|
|
|
-
|
|
|
-`embed.go` builds the JSON files in this directory into the binary, so that
|
|
|
-`go install` delivers them: it copies a binary to `$GOPATH/bin` and creates no
|
|
|
-data directory, so without that an installed tool would find no definition for
|
|
|
-this board and no way to fetch one. The file is embedded, not copied — there is
|
|
|
-one file here, and a file placed in a definitions directory at runtime takes
|
|
|
-precedence over it.
|
|
|
-
|
|
|
-## Two things a file does not tell the tool
|
|
|
-
|
|
|
-The names it carries are the manufacturer's spelling, which need not be the
|
|
|
-tool's. The tool's aliases and its own spellings resolve alongside them — a
|
|
|
-definition writing `fixed wave` still answers to `fixed_wave` — and
|
|
|
-`qmk-rgb-tool info` reports whichever spelling the source in use has.
|
|
|
-
|
|
|
-A file also names only the effects a board's firmware implements, so it may
|
|
|
-stop short of the board's highest effect ID. This one's backlight channel stops
|
|
|
-at 45 while the board takes ID 46 as well, which no source names: the tool
|
|
|
-reports it as `unknown` rather than inventing a word for it.
|