Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/features/encoders.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
48 changes: 25 additions & 23 deletions docs/features/rgblight.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,30 +59,32 @@ 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 |
|Key |Aliases |Description |
|------------------------------|----------|---------------------------------------------------------------------|
|`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.
:::


Expand Down Expand Up @@ -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

Expand Down
43 changes: 23 additions & 20 deletions docs/keycodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -701,26 +701,29 @@ 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 |
|Key |Aliases |Description |
|------------------------------|----------|---------------------------------------------------------------------|
|`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}

Expand Down
Loading