|
|
@@ -88,12 +88,25 @@ re-run the command whenever commands or flags change.
|
|
|
./qmk-rgb-tool --device 1 enable
|
|
|
```
|
|
|
|
|
|
-`--zone` accepts `logo`, `backlight`, or `side` and may be given on any
|
|
|
-subcommand. It is not remembered between runs: repeat it on every invocation.
|
|
|
-Without `--zone`, commands target Logo, Backlight, and Side in that order.
|
|
|
-With `--zone`, commands target exactly the selected zone. An unsupported
|
|
|
-name for an explicit zone fails before the device is opened; a default
|
|
|
-command skips unsupported zones and prints a warning on stderr.
|
|
|
+`--zone` accepts a VIA lighting channel: `backlight`, `rgblight`, `rgb_matrix`,
|
|
|
+`audio` or `led_matrix`, and may be given on any subcommand. The name follows
|
|
|
+from the channel number, so it works on every QMK keyboard. A board listed in
|
|
|
+`keyboards.json` may give a channel a display name, and that name is accepted
|
|
|
+too — the Impact 80 calls channels 2, 3 and 4 `logo`, `backlight` and `side`.
|
|
|
+Where a display name would be the subsystem name of a different channel the
|
|
|
+keyboard has, the board is refused rather than a command being sent to the wrong
|
|
|
+channel.
|
|
|
+
|
|
|
+`--zone` is not remembered between runs: repeat it on every invocation. Without
|
|
|
+`--zone`, commands target every channel the keyboard reports, in channel order.
|
|
|
+With `--zone`, commands target exactly the named channel. An unknown name fails
|
|
|
+before the device is opened; an effect a named channel does not have fails
|
|
|
+rather than being skipped, while a default command skips it and prints a
|
|
|
+warning on stderr.
|
|
|
+
|
|
|
+The keyboard is asked which channels it has: one read per channel, and a channel
|
|
|
+its firmware does not implement answers as unhandled. `keyboard info` does not
|
|
|
+report them, because it never opens the keyboard.
|
|
|
|
|
|
All output is machine-parseable JSON when applicable.
|
|
|
|
|
|
@@ -151,6 +164,22 @@ Hex is the wider of the two: at full brightness it reaches 195,841 colors, a pai
|
|
|
of 8-bit hue and saturation values 56,654. They cover the same colors, and `hsv:`
|
|
|
trades some of that range for direct addressing.
|
|
|
|
|
|
+## Effect Names Are Per Board
|
|
|
+
|
|
|
+The keyboard holds effect numbers, not names, so `effect <name>` needs a catalog
|
|
|
+and the tool has one for the Impact 80. Its 46 backlight names are QMK's
|
|
|
+`rgb_matrix_effects.inc` in order, verified against the keyboard's register; the
|
|
|
+7 `logo` and 7 `side` names are that board's vendor VIA definition, whose
|
|
|
+dropdowns read `fixed wave` and `breathe`; the compatibility aliases are the
|
|
|
+tool's own.
|
|
|
+
|
|
|
+A keyboard without a catalog is still driven: `brightness`, `speed`, `color`,
|
|
|
+`mode <index>` and `info` all work, because none of them needs a name. Only
|
|
|
+`effect <name>` and `effect --list` need the catalog, and they say so rather than
|
|
|
+guessing. `enable` is the third command that needs one, because it has to choose
|
|
|
+an effect to turn a channel on, and it refuses without a catalog rather than
|
|
|
+picking an ID blind.
|
|
|
+
|
|
|
## Brightness and Speed Are Not Applied Verbatim
|
|
|
|
|
|
The keyboard's firmware transforms these values per channel, so the accepted
|
|
|
@@ -383,7 +412,7 @@ Two models are listed in `keyboards.json`:
|
|
|
| `qmk-rgb-tool color rgb:<hex>` | The same hex color, written out |
|
|
|
| `qmk-rgb-tool color hsv:<h>,<s>,<v>` | Set hue and saturation (0–255) and write `v` to the brightness of the same zones |
|
|
|
| `qmk-rgb-tool mode <index>` | Set a raw zone-specific effect ID |
|
|
|
-| `qmk-rgb-tool --zone <zone> ...` | Target `logo`, `backlight`, or `side` |
|
|
|
+| `qmk-rgb-tool --zone <channel> ...` | Target one channel: `backlight`, `rgblight`, `rgb_matrix`, `audio` or `led_matrix`, or a name from `keyboards.json` |
|
|
|
| `qmk-rgb-tool --device <n> ...` | Target keyboard by number (see `keyboard info`) |
|
|
|
| `qmk-rgb-tool save [name]` | Save current RGB state to `profiles/<name>.json` (name lowercased, non-`[a-z0-9-_]` mapped to `-`) |
|
|
|
| `qmk-rgb-tool load [name]` | Load and apply a profile from `profiles/` |
|
|
|
@@ -419,8 +448,14 @@ Communicates via the QMK Raw HID interface (`Usage Page 0xFF60`, `Usage 0x61`) w
|
|
|
|
|
|
- `0x07` — Custom set value
|
|
|
- `0x08` — Custom get value
|
|
|
-- Lighting channels: `0x02` logo, `0x03` backlight, `0x04` side lighting
|
|
|
-- RGB values: brightness `0x01`, effect `0x02`, speed `0x03`, color `0x04`
|
|
|
+- Lighting channels are QMK's `id_qmk_*_channel` values: `0x01` backlight,
|
|
|
+ `0x02` rgblight, `0x03` rgb_matrix, `0x04` audio, `0x05` led_matrix. A
|
|
|
+ channel the firmware does not compile in answers a get with `0xFF`, which is
|
|
|
+ how the tool discovers what a keyboard has. The Impact 80 uses `0x02` for its
|
|
|
+ logo, `0x03` for its backlight and `0x04` for its side lighting.
|
|
|
+- RGB values are identical for every lighting subsystem: brightness `0x01`,
|
|
|
+ effect `0x02`, speed `0x03`, color `0x04`. That uniformity is why the tool has
|
|
|
+ no per-subsystem code path.
|
|
|
|
|
|
`enable` and `disable` use no separate handshake: they set the effect ID and
|
|
|
brightness, and nothing else.
|