summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick <nick.win999@gmail.com>2020-08-08 17:23:11 -0500
committerNick <nick.win999@gmail.com>2020-08-08 17:23:11 -0500
commitc92f114efe14e1ad7f7fafbb2f3cc402cefa1bbe (patch)
tree189e7caa0cc89a204c1426187669d2f95a79ca6b
parente2848c66c305442badd2b21a414c1a8fe89cd4fd (diff)
Add lighting behavior docs
-rw-r--r--docs/docs/behavior/lighting.md50
-rw-r--r--docs/sidebars.js6
2 files changed, 55 insertions, 1 deletions
diff --git a/docs/docs/behavior/lighting.md b/docs/docs/behavior/lighting.md
new file mode 100644
index 0000000..432960e
--- /dev/null
+++ b/docs/docs/behavior/lighting.md
@@ -0,0 +1,50 @@
+---
+title: Lighting
+---
+
+## Summary
+
+Lighting is often used for either aesthetics or for the practical purposes of lighting up keys in the dark.
+Currently ZMK supports RGB underglow, which can be changed and configured using its behavior.
+
+## RGB Action Defines
+
+RGB actions defines are provided through the [`dt-bindings/zmk/rgb.h`](https://github.com/zmkfirmware/zmk/blob/main/app/include/dt-bindings/zmk/rgb.h) header,
+which is added at the top of the keymap file:
+
+```
+#include <dt-bindings/zmk/rgb.h>
+```
+
+This will allow you to reference the actions defined in this header such as `RGB_TOG`.
+
+Here is a table describing the action for each define:
+
+| Define | Action |
+|-----------|-----------------------------------------------------------|
+| `RGB_TOG` | Toggles the RGB feature on and off |
+| `RGB_HUI` | Increases the hue of the RGB feature |
+| `RGB_HUD` | Decreases the hue of the RGB feature |
+| `RGB_SAI` | Increases the saturation of the RGB feature |
+| `RGB_SAD` | Decreases the saturation of the RGB feature |
+| `RGB_BRI` | Increases the brightness of the RGB feature |
+| `RGB_BRD` | Decreases the brightness of the RGB feature |
+| `RGB_SPI` | Increases the speed of the RGB feature effect's animation |
+| `RGB_SPD` | Decreases the speed of the RGB feature effect's animation |
+| `RGB_EFF` | Cycles the RGB feature's effect forwards |
+| `RGB_EFR` | Cycles the RGB feature's effect reverse |
+
+## RGB Underglow
+
+The "RGB underglow" behavior completes an RGB action given on press.
+
+### Behavior Binding
+
+- Reference: `&rgb_ug`
+- Parameter: The RGB action define, e.g. `RGB_TOG` or `RGB_BRI`
+
+Example:
+
+```
+&rgb_ug RGB_TOG
+``` \ No newline at end of file
diff --git a/docs/sidebars.js b/docs/sidebars.js
index 7b04864..1bd0358 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -7,7 +7,11 @@ module.exports = {
"feature/encoders",
"feature/underglow",
],
- Behaviors: ["behavior/key-press", "behavior/layers"],
+ Behaviors: [
+ "behavior/key-press",
+ "behavior/layers",
+ "behavior/lighting",
+ ],
Development: [
"dev-clean-room",
"dev-setup",