|
@@ -155,12 +155,11 @@ into the prompt, which is worse than an empty list.
|
|
|
./qmk-rgb-tool effect backlight 17
|
|
./qmk-rgb-tool effect backlight 17
|
|
|
./qmk-rgb-tool enable all
|
|
./qmk-rgb-tool enable all
|
|
|
./qmk-rgb-tool disable logo
|
|
./qmk-rgb-tool disable logo
|
|
|
-./qmk-rgb-tool info
|
|
|
|
|
|
|
|
|
|
-# Reading needs no target: without a name, an effect or an info reads everything
|
|
|
|
|
|
|
+# Reading needs no target, and a read may still name one to narrow itself
|
|
|
|
|
+./qmk-rgb-tool info
|
|
|
./qmk-rgb-tool effect all
|
|
./qmk-rgb-tool effect all
|
|
|
./qmk-rgb-tool effect logo
|
|
./qmk-rgb-tool effect logo
|
|
|
-./qmk-rgb-tool info
|
|
|
|
|
|
|
|
|
|
# Save and load RGB profiles
|
|
# Save and load RGB profiles
|
|
|
./qmk-rgb-tool save paul
|
|
./qmk-rgb-tool save paul
|
|
@@ -259,7 +258,7 @@ keyboard to learn which channels to list.
|
|
|
|
|
|
|
|
```bash
|
|
```bash
|
|
|
./qmk-rgb-tool keyboard info
|
|
./qmk-rgb-tool keyboard info
|
|
|
-./qmk-rgb-tool --device 2 brightness 160
|
|
|
|
|
|
|
+./qmk-rgb-tool --device 2 brightness logo 160
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
Without `--device`, commands that open a keyboard run only when exactly one is
|
|
Without `--device`, commands that open a keyboard run only when exactly one is
|
|
@@ -365,13 +364,14 @@ stays `unknown` and is set by number. Its behaviour is measured and worth
|
|
|
knowing: set after a moving effect, it leaves the LEDs on the pattern they are
|
|
knowing: set after a moving effect, it leaves the LEDs on the pattern they are
|
|
|
currently showing and stops the animation — `cycle_left_right` frozen still looks
|
|
currently showing and stops the animation — `cycle_left_right` frozen still looks
|
|
|
like a standing rainbow, because that is what it froze. It is also not the same
|
|
like a standing rainbow, because that is what it froze. It is also not the same
|
|
|
-as `speed 0`, which leaves the effect selected and only takes the rate to zero:
|
|
|
|
|
-the two differ in the registers, one on the effect and one on the speed.
|
|
|
|
|
|
|
+as `speed backlight 0`, which leaves the effect selected and only takes the rate
|
|
|
|
|
+to zero: the two differ in the registers, one on the effect and one on the speed.
|
|
|
|
|
|
|
|
Wobkey's own
|
|
Wobkey's own
|
|
|
[VIA definition JSON](https://drive.wobkey.com/f/d/6BtO/Impact_80.JSON) stops at
|
|
[VIA definition JSON](https://drive.wobkey.com/f/d/6BtO/Impact_80.JSON) stops at
|
|
|
45 and contains no word for pause, stop, freeze or hold, so VIA cannot set this
|
|
45 and contains no word for pause, stop, freeze or hold, so VIA cannot set this
|
|
|
-ID from its dropdown either. A raw `effect 46` is the only way to reach it.
|
|
|
|
|
|
|
+ID from its dropdown either. A raw `effect backlight 46` is the only way to reach
|
|
|
|
|
+it.
|
|
|
|
|
|
|
|
A keyboard without a catalog is still driven: `brightness`, `speed`, `color`,
|
|
A keyboard without a catalog is still driven: `brightness`, `speed`, `color`,
|
|
|
an effect index and `info` all work, because none of them needs a name. Four
|
|
an effect index and `info` all work, because none of them needs a name. Four
|
|
@@ -408,7 +408,7 @@ the board does not have anywhere is reported as unknown:
|
|
|
$ qmk-rgb-tool effect logo rainbow_moving_chevron
|
|
$ qmk-rgb-tool effect logo rainbow_moving_chevron
|
|
|
Error: effect rainbow_moving_chevron is not supported on rgblight
|
|
Error: effect rainbow_moving_chevron is not supported on rgblight
|
|
|
$ qmk-rgb-tool effect rgb_matrix nonsense
|
|
$ qmk-rgb-tool effect rgb_matrix nonsense
|
|
|
-Error: unknown effect: nonsense
|
|
|
|
|
|
|
+Error: unknown effect: nonsense (an effect ID from 0 to 255 is `effect <zone> <index>`)
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
### Where Effect Names Can Come From
|
|
### Where Effect Names Can Come From
|
|
@@ -513,6 +513,12 @@ those two channels is `[0, 4]`, not 0–255:
|
|
|
The freeze at `0` was observed on `logo`; `side` reports the same range and the
|
|
The freeze at `0` was observed on `logo`; `side` reports the same range and the
|
|
|
same collapse to 4. `backlight` is the only channel with a usable 0–255 range.
|
|
same collapse to 4. `backlight` is the only channel with a usable 0–255 range.
|
|
|
|
|
|
|
|
|
|
+The definition file's own ranges are a separate thing from what the firmware
|
|
|
|
|
+accepts, and the two disagree about brightness. It offers `[0, 160]` for
|
|
|
|
|
+brightness on all three channels, so VIA's sliders stop at 160 everywhere, while
|
|
|
|
|
+the firmware scales `backlight` past that to 255. The table above is what the
|
|
|
|
|
+keyboard does, measured; the ranges in the file are what VIA's UI offers.
|
|
|
|
|
+
|
|
|
The command exits 0 either way: a value the firmware cannot represent is not a
|
|
The command exits 0 either way: a value the firmware cannot represent is not a
|
|
|
failure, but the summary line always states the value that was actually applied.
|
|
failure, but the summary line always states the value that was actually applied.
|
|
|
|
|
|
|
@@ -601,7 +607,7 @@ Effects fall into categories that behave differently:
|
|
|
- **Gradient** effects (`gradient_up_down`, `gradient_left_right`) create a color gradient across the keyboard. They do not honor `color`.
|
|
- **Gradient** effects (`gradient_up_down`, `gradient_left_right`) create a color gradient across the keyboard. They do not honor `color`.
|
|
|
- **Alphas mods** (`alphas_mods`) colors modifier keys differently from alphanumeric keys. The colors are built-in and cannot be changed.
|
|
- **Alphas mods** (`alphas_mods`) colors modifier keys differently from alphanumeric keys. The colors are built-in and cannot be changed.
|
|
|
|
|
|
|
|
-To set a permanent color, use `solid_color` and then `color <hex>`.
|
|
|
|
|
|
|
+To set a permanent color, use `solid_color` and then `color <zone> <hex>`.
|
|
|
|
|
|
|
|
The `logo` and `side` catalogs hold only seven effects each, and the color you
|
|
The `logo` and `side` catalogs hold only seven effects each, and the color you
|
|
|
set is shown by three of them: `fixed_wave`, `breathing` and `light`. `wave`,
|
|
set is shown by three of them: `fixed_wave`, `breathing` and `light`. `wave`,
|
|
@@ -616,10 +622,18 @@ for Logo/Side and `rainbow_moving_chevron` for Backlight, `rainbow_wave` →
|
|
|
for Backlight. The legacy `static` alias remains accepted as a compatibility
|
|
for Backlight. The legacy `static` alias remains accepted as a compatibility
|
|
|
alias for `solid`.
|
|
alias for `solid`.
|
|
|
|
|
|
|
|
-`off` is accepted on every channel, but it cannot be set by effect ID on `logo`
|
|
|
|
|
-and `side`: the firmware reads ID 0 there as "lighting off" and leaves the mode
|
|
|
|
|
-register where it was, so the effect that was running keeps running. `disable` is
|
|
|
|
|
-the command that turns a channel off, because it also writes brightness 0.
|
|
|
|
|
|
|
+Those aliases are the three channels the Impact 80 names — `rgblight`,
|
|
|
|
|
+`rgb_matrix` and `audio`. `defaultAliases` in `internal/rgb/catalog.go` is the
|
|
|
|
|
+one place they are listed, and it has no entry for `backlight` or `led_matrix`,
|
|
|
|
|
+so on a keyboard that has one of those channels an alias is refused by name
|
|
|
|
|
+(`effect off is not supported on backlight`) rather than resolved. This board
|
|
|
|
|
+has neither, which is why the difference is not visible here.
|
|
|
|
|
+
|
|
|
|
|
+`off` resolves on Logo, Backlight and Side, but it cannot be set by effect ID on
|
|
|
|
|
+`logo` and `side`: the firmware reads ID 0 there as "lighting off" and leaves the
|
|
|
|
|
+mode register where it was, so the effect that was running keeps running.
|
|
|
|
|
+`disable` is the command that turns a channel off, because it also writes
|
|
|
|
|
+brightness 0.
|
|
|
|
|
|
|
|
The aliases belong to the tool, not to a board, so they work for every catalog —
|
|
The aliases belong to the tool, not to a board, so they work for every catalog —
|
|
|
including one read from a definition file. A name resolves to itself, to the name
|
|
including one read from a definition file. A name resolves to itself, to the name
|
|
@@ -734,12 +748,13 @@ channel at all is listed and then fails every command that opens it with
|
|
|
A definition also names its channels, and that is where the name comes from —
|
|
A definition also names its channels, and that is where the name comes from —
|
|
|
there is no other place. They are the names VIA shows, so the tool and VIA call
|
|
there is no other place. They are the names VIA shows, so the tool and VIA call
|
|
|
a channel the same thing, and a name is matched ignoring case. On a board whose
|
|
a channel the same thing, and a name is matched ignoring case. On a board whose
|
|
|
-definition writes `Backlight`, all of `brightness backlight`, `brightness Backlight` and
|
|
|
|
|
-`brightness rgb_matrix` reach the same channel: the label is the name, the subsystem
|
|
|
|
|
-stays accepted because it follows from the channel number. `qmk-rgb-tool
|
|
|
|
|
-keyboard definitions` prints the label beside the subsystem it stands for, and says
|
|
|
|
|
-where each definition came from — `user` for a file in the per-user directory,
|
|
|
|
|
-`built-in` for one compiled into the binary:
|
|
|
|
|
|
|
+definition writes `Backlight`, these three reach the same channel:
|
|
|
|
|
+`brightness backlight 160`, `brightness Backlight 160` and
|
|
|
|
|
+`brightness rgb_matrix 160`. The label is the name, and the subsystem stays
|
|
|
|
|
+accepted because it follows from the channel number. `qmk-rgb-tool
|
|
|
|
|
+keyboard definitions` prints the label beside the subsystem it stands for, and
|
|
|
|
|
+says where each definition came from — `user` for a file in the per-user
|
|
|
|
|
+directory, `built-in` for one compiled into the binary:
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
Definitions
|
|
Definitions
|
|
@@ -793,7 +808,7 @@ board", and that file is gone, so the field would have been unanswerable:
|
|
|
| `qmk-rgb-tool enable <zone>` | Enable the named lighting zones |
|
|
| `qmk-rgb-tool enable <zone>` | Enable the named lighting zones |
|
|
|
| `qmk-rgb-tool disable <zone>` | Disable the named lighting zones |
|
|
| `qmk-rgb-tool disable <zone>` | Disable the named lighting zones |
|
|
|
| `qmk-rgb-tool info [zone]` | Show per-zone RGB state; without a zone, every channel |
|
|
| `qmk-rgb-tool info [zone]` | Show per-zone RGB state; without a zone, every channel |
|
|
|
-| `qmk-rgb-tool effect <zone> <name\|index>` | Set an effect by name, or a raw effect index 0–255, verified by read-back; a board that does not implement the index clamps it to the highest it does |
|
|
|
|
|
|
|
+| `qmk-rgb-tool effect <zone> [name\|index]` | Set an effect by name, or a raw effect index 0–255, verified by read-back; a board that does not implement the index clamps it to the highest it does |
|
|
|
| `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 |
|
|
| `qmk-rgb-tool keyboard fetch` | Download the VIA definition for the connected keyboard |
|
|
|
| `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 |
|
|
@@ -815,7 +830,11 @@ board", and that file is gone, so the field would have been unanswerable:
|
|
|
|
|
|
|
|
`enable` and `disable` take a zone and nothing else. `brightness`, `speed` and
|
|
`enable` and `disable` take a zone and nothing else. `brightness`, `speed` and
|
|
|
`color` take a zone and a value. `effect` takes a zone and, optionally, an effect
|
|
`color` take a zone and a value. `effect` takes a zone and, optionally, an effect
|
|
|
-name or a raw effect ID: two arguments set it, one lists that zone's effects.
|
|
|
|
|
|
|
+name or a raw effect ID: two arguments set it, one lists that zone's effects, so
|
|
|
|
|
+its form is `effect <zone> [name|index]`. A message that points at the ID form
|
|
|
|
|
+spells out both arguments — `effect <zone> <index>` — because the zone is
|
|
|
|
|
+required, and an index written in the zone's place is read as a channel named
|
|
|
|
|
+after it.
|
|
|
`info` takes at most a zone, `load` a profile name and at most a zone, `save` and
|
|
`info` takes at most a zone, `load` a profile name and at most a zone, `save` and
|
|
|
`delete` an optional name, and `list` nothing. `list` and the `keyboard`
|
|
`delete` an optional name, and `list` nothing. `list` and the `keyboard`
|
|
|
subcommands reject a stray token, which is how a mistyped invocation is caught
|
|
subcommands reject a stray token, which is how a mistyped invocation is caught
|
|
@@ -868,6 +887,7 @@ files instead.
|
|
|
|
|
|
|
|
```
|
|
```
|
|
|
cmd/qmk-rgb-tool/ # Cobra-based CLI
|
|
cmd/qmk-rgb-tool/ # Cobra-based CLI
|
|
|
|
|
+definitions/ # VIA definition files built into the binary with go:embed
|
|
|
internal/device/ # HID discovery
|
|
internal/device/ # HID discovery
|
|
|
internal/hid/ # Cross-platform HID access (hidapi)
|
|
internal/hid/ # Cross-platform HID access (hidapi)
|
|
|
internal/rgb/ # Effects, colors, state
|
|
internal/rgb/ # Effects, colors, state
|