[docs] Update RGBLight (Underglow) keycode names (#23999)

This commit is contained in:
Ryan 2024-07-06 11:14:09 +10:00 committed by GitHub
parent be967d42d2
commit b82f6ac402
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 51 additions and 46 deletions

View File

@ -85,9 +85,9 @@ Your `keymap.c` will then need an encoder mapping defined (for four layers and t
#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
[0] = { ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI) },
[2] = { ENCODER_CCW_CW(RGB_VAD, RGB_VAI), ENCODER_CCW_CW(RGB_SPD, RGB_SPI) },
[3] = { ENCODER_CCW_CW(RGB_RMOD, RGB_MOD), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) },
[1] = { ENCODER_CCW_CW(UG_HUED, UG_HUEU), ENCODER_CCW_CW(UG_SATD, UG_SATU) },
[2] = { ENCODER_CCW_CW(UG_VALD, UG_VALU), ENCODER_CCW_CW(UG_SPDD, UG_SPDU) },
[3] = { ENCODER_CCW_CW(UG_PREV, UG_NEXT), ENCODER_CCW_CW(KC_RIGHT, KC_LEFT) },
};
#endif
```

View File

@ -60,29 +60,31 @@ Changing the **Value** sets the overall brightness.<br>
## Keycodes
|Key |Aliases |Description |
|-------------------|----------|--------------------------------------------------------------------|
|`RGB_TOG` | |Toggle RGB lighting on or off |
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
|`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
|`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode |
|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode |
|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode |
|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode |
|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode |
|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode |
|------------------------------|----------|---------------------------------------------------------------------|
|`QK_UNDERGLOW_TOGGLE` |`UG_TOGG` |Toggle RGB lighting on or off |
|`QK_UNDERGLOW_MODE_NEXT` |`UG_NEXT` |Cycle through modes, reverse direction when Shift is held |
|`QK_UNDERGLOW_MODE_PREVIOUS` |`UG_PREV` |Cycle through modes in reverse, forward direction when Shift is held |
|`QK_UNDERGLOW_HUE_UP` |`UG_HUEU` |Increase hue, decrease hue when Shift is held |
|`QK_UNDERGLOW_HUE_DOWN` |`UG_HUED` |Decrease hue, increase hue when Shift is held |
|`QK_UNDERGLOW_SATURATION_UP` |`UG_SATU` |Increase saturation, decrease saturation when Shift is held |
|`QK_UNDERGLOW_SATURATION_DOWN`|`UG_SATD` |Decrease saturation, increase saturation when Shift is held |
|`QK_UNDERGLOW_VALUE_UP` |`UG_VALU` |Increase value (brightness), decrease value when Shift is held |
|`QK_UNDERGLOW_VALUE_DOWN` |`UG_VALD` |Decrease value (brightness), increase value when Shift is held |
|`QK_UNDERGLOW_SPEED_UP` |`UG_SPDU` |Increase effect speed (brightness), decrease speed when Shift is held|
|`QK_UNDERGLOW_SPEED_DOWN` |`UG_SPDD` |Decrease effect speed (brightness), increase speed when Shift is held|
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode (deprecated) |
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode (deprecated) |
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode (deprecated) |
|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode (deprecated) |
|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode (deprecated) |
|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode (deprecated) |
|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode (deprecated) |
|`RGB_MODE_GRADIENT` |`RGB_M_G` |Static gradient animation mode (deprecated) |
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode (deprecated) |
|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode (deprecated) |
::: tip
`RGB_*` keycodes cannot be used with functions like `tap_code16(RGB_HUI)` as they're not USB HID keycodes. If you wish to replicate similar behaviour in custom code within your firmware (e.g. inside `encoder_update_user()` or `process_record_user()`), the equivalent [RGB functions](#functions) should be used instead.
These keycodes cannot be used with functions like `tap_code16()` as they are not USB HID keycodes. If you wish to replicate similar behaviour in custom code within your firmware (e.g. inside `encoder_update_user()` or `process_record_user()`), the equivalent [RGB functions](#functions) should be used instead.
:::
@ -358,7 +360,7 @@ Lighting layers on split keyboards will require layer state synced to the slave
### Overriding RGB Lighting on/off status
Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `RGB_TOG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`.
Normally lighting layers are not shown when RGB Lighting is disabled (e.g. with `UG_TOGG` keycode). If you would like lighting layers to work even when the RGB Lighting is otherwise off, add `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF` to your `config.h`.
### Retain brightness

View File

@ -702,25 +702,28 @@ See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term)
See also: [RGB Lighting](features/rgblight)
|Key |Aliases |Description |
|-------------------|----------|--------------------------------------------------------------------|
|`RGB_TOG` | |Toggle RGB lighting on or off |
|`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held |
|`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held|
|`RGB_HUI` | |Increase hue, decrease hue when Shift is held |
|`RGB_HUD` | |Decrease hue, increase hue when Shift is held |
|`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held |
|`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held |
|`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held |
|`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held |
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode |
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode |
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode |
|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode |
|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode |
|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode |
|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode |
|`RGB_MODE_GRADIENT`|`RGB_M_G` |Static gradient animation mode |
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red,Green,Blue test animation mode |
|------------------------------|----------|---------------------------------------------------------------------|
|`QK_UNDERGLOW_TOGGLE` |`UG_TOGG` |Toggle RGB lighting on or off |
|`QK_UNDERGLOW_MODE_NEXT` |`UG_NEXT` |Cycle through modes, reverse direction when Shift is held |
|`QK_UNDERGLOW_MODE_PREVIOUS` |`UG_PREV` |Cycle through modes in reverse, forward direction when Shift is held |
|`QK_UNDERGLOW_HUE_UP` |`UG_HUEU` |Increase hue, decrease hue when Shift is held |
|`QK_UNDERGLOW_HUE_DOWN` |`UG_HUED` |Decrease hue, increase hue when Shift is held |
|`QK_UNDERGLOW_SATURATION_UP` |`UG_SATU` |Increase saturation, decrease saturation when Shift is held |
|`QK_UNDERGLOW_SATURATION_DOWN`|`UG_SATD` |Decrease saturation, increase saturation when Shift is held |
|`QK_UNDERGLOW_VALUE_UP` |`UG_VALU` |Increase value (brightness), decrease value when Shift is held |
|`QK_UNDERGLOW_VALUE_DOWN` |`UG_VALD` |Decrease value (brightness), increase value when Shift is held |
|`QK_UNDERGLOW_SPEED_UP` |`UG_SPDU` |Increase effect speed (brightness), decrease speed when Shift is held|
|`QK_UNDERGLOW_SPEED_DOWN` |`UG_SPDD` |Decrease effect speed (brightness), increase speed when Shift is held|
|`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode (deprecated) |
|`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode (deprecated) |
|`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode (deprecated) |
|`RGB_MODE_SWIRL` |`RGB_M_SW`|Swirl animation mode (deprecated) |
|`RGB_MODE_SNAKE` |`RGB_M_SN`|Snake animation mode (deprecated) |
|`RGB_MODE_KNIGHT` |`RGB_M_K` |"Knight Rider" animation mode (deprecated) |
|`RGB_MODE_XMAS` |`RGB_M_X` |Christmas animation mode (deprecated) |
|`RGB_MODE_GRADIENT` |`RGB_M_G` |Static gradient animation mode (deprecated) |
|`RGB_MODE_RGBTEST` |`RGB_M_T` |Red, Green, Blue test animation mode (deprecated) |
|`RGB_MODE_TWINKLE` |`RGB_M_TW`|Twinkle animation mode (deprecated) |
## RGB Matrix Lighting {#rgb-matrix-lighting}