diff options
| -rw-r--r-- | docs/feature_rgb_matrix.md | 24 | ||||
| -rw-r--r-- | docs/feature_rgblight.md | 12 | ||||
| -rw-r--r-- | docs/keycodes.md | 38 | ||||
| -rw-r--r-- | quantum/quantum.c | 48 |
4 files changed, 79 insertions, 43 deletions
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md index 3e69361fb..5b834a99d 100644 --- a/docs/feature_rgb_matrix.md +++ b/docs/feature_rgb_matrix.md | |||
| @@ -173,16 +173,20 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{ | |||
| 173 | 173 | ||
| 174 | All RGB keycodes are currently shared with the RGBLIGHT system: | 174 | All RGB keycodes are currently shared with the RGBLIGHT system: |
| 175 | 175 | ||
| 176 | * `RGB_TOG` - toggle | 176 | |Key |Aliases |Description | |
| 177 | * `RGB_MOD` - cycle through modes | 177 | |-------------------|----------|--------------------------------------------------------------------------------------| |
| 178 | * `RGB_HUI` - increase hue | 178 | |`RGB_TOG` | |Toggle RGB lighting on or off | |
| 179 | * `RGB_HUD` - decrease hue | 179 | |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | |
| 180 | * `RGB_SAI` - increase saturation | 180 | |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held | |
| 181 | * `RGB_SAD` - decrease saturation | 181 | |`RGB_HUI` | |Increase hue, decrease hue when Shift is held | |
| 182 | * `RGB_VAI` - increase value | 182 | |`RGB_HUD` | |Decrease hue, increase hue when Shift is held | |
| 183 | * `RGB_VAD` - decrease value | 183 | |`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held | |
| 184 | * `RGB_SPI` - increase speed effect (no EEPROM support) | 184 | |`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held | |
| 185 | * `RGB_SPD` - decrease speed effect (no EEPROM support) | 185 | |`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held | |
| 186 | |`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held | | ||
| 187 | |`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held| | ||
| 188 | |`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held| | ||
| 189 | |||
| 186 | * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system | 190 | * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system |
| 187 | 191 | ||
| 188 | ## RGB Matrix Effects | 192 | ## RGB Matrix Effects |
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md index 2e9610163..69a6aaaed 100644 --- a/docs/feature_rgblight.md +++ b/docs/feature_rgblight.md | |||
| @@ -48,12 +48,12 @@ Changing the **Value** sets the overall brightness.<br> | |||
| 48 | |`RGB_TOG` | |Toggle RGB lighting on or off | | 48 | |`RGB_TOG` | |Toggle RGB lighting on or off | |
| 49 | |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | | 49 | |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | |
| 50 | |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| | 50 | |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| |
| 51 | |`RGB_HUI` | |Increase hue | | 51 | |`RGB_HUI` | |Increase hue, decrease hue when Shift is held | |
| 52 | |`RGB_HUD` | |Decrease hue | | 52 | |`RGB_HUD` | |Decrease hue, increase hue when Shift is held | |
| 53 | |`RGB_SAI` | |Increase saturation | | 53 | |`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held | |
| 54 | |`RGB_SAD` | |Decrease saturation | | 54 | |`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held | |
| 55 | |`RGB_VAI` | |Increase value (brightness) | | 55 | |`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held | |
| 56 | |`RGB_VAD` | |Decrease value (brightness) | | 56 | |`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held | |
| 57 | |`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | | 57 | |`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | |
| 58 | |`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | | 58 | |`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | |
| 59 | |`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode | | 59 | |`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode | |
diff --git a/docs/keycodes.md b/docs/keycodes.md index fa01df63d..d777246f6 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md | |||
| @@ -389,12 +389,12 @@ This is a reference only. Each group of keys links to the page documenting their | |||
| 389 | |`RGB_TOG` | |Toggle RGB lighting on or off | | 389 | |`RGB_TOG` | |Toggle RGB lighting on or off | |
| 390 | |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | | 390 | |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | |
| 391 | |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| | 391 | |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| |
| 392 | |`RGB_HUI` | |Increase hue | | 392 | |`RGB_HUI` | |Increase hue, decrease hue when Shift is held | |
| 393 | |`RGB_HUD` | |Decrease hue | | 393 | |`RGB_HUD` | |Decrease hue, increase hue when Shift is held | |
| 394 | |`RGB_SAI` | |Increase saturation | | 394 | |`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held | |
| 395 | |`RGB_SAD` | |Decrease saturation | | 395 | |`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held | |
| 396 | |`RGB_VAI` | |Increase value (brightness) | | 396 | |`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held | |
| 397 | |`RGB_VAD` | |Decrease value (brightness) | | 397 | |`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held | |
| 398 | |`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | | 398 | |`RGB_MODE_PLAIN` |`RGB_M_P `|Static (no animation) mode | |
| 399 | |`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | | 399 | |`RGB_MODE_BREATHE` |`RGB_M_B` |Breathing animation mode | |
| 400 | |`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode | | 400 | |`RGB_MODE_RAINBOW` |`RGB_M_R` |Rainbow animation mode | |
| @@ -407,19 +407,19 @@ This is a reference only. Each group of keys links to the page documenting their | |||
| 407 | 407 | ||
| 408 | ## [RGB Matrix Lighting](feature_rgb_matrix.md) | 408 | ## [RGB Matrix Lighting](feature_rgb_matrix.md) |
| 409 | 409 | ||
| 410 | |Key |Aliases |Description | | 410 | |Key |Aliases |Description | |
| 411 | |-------------------|----------|--------------------------------------------------------------------| | 411 | |-------------------|----------|--------------------------------------------------------------------------------------| |
| 412 | |`RGB_TOG` | |Toggle RGB lighting on or off | | 412 | |`RGB_TOG` | |Toggle RGB lighting on or off | |
| 413 | |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | | 413 | |`RGB_MODE_FORWARD` |`RGB_MOD` |Cycle through modes, reverse direction when Shift is held | |
| 414 | |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held| | 414 | |`RGB_MODE_REVERSE` |`RGB_RMOD`|Cycle through modes in reverse, forward direction when Shift is held | |
| 415 | |`RGB_HUI` | |Increase hue | | 415 | |`RGB_HUI` | |Increase hue, decrease hue when Shift is held | |
| 416 | |`RGB_HUD` | |Decrease hue | | 416 | |`RGB_HUD` | |Decrease hue, increase hue when Shift is held | |
| 417 | |`RGB_SAI` | |Increase saturation | | 417 | |`RGB_SAI` | |Increase saturation, decrease saturation when Shift is held | |
| 418 | |`RGB_SAD` | |Decrease saturation | | 418 | |`RGB_SAD` | |Decrease saturation, increase saturation when Shift is held | |
| 419 | |`RGB_VAI` | |Increase value (brightness) | | 419 | |`RGB_VAI` | |Increase value (brightness), decrease value when Shift is held | |
| 420 | |`RGB_VAD` | |Decrease value (brightness) | | 420 | |`RGB_VAD` | |Decrease value (brightness), increase value when Shift is held | |
| 421 | |`RGB_SPI` | |Increase effect speed (does no support eeprom yet) | | 421 | |`RGB_SPI` | |Increase effect speed (does not support eeprom yet), decrease speed when Shift is held| |
| 422 | |`RGB_SPD` | |Decrease effect speed (does no support eeprom yet) | | 422 | |`RGB_SPD` | |Decrease effect speed (does not support eeprom yet), increase speed when Shift is held| |
| 423 | 423 | ||
| 424 | ## [Thermal Printer](feature_thermal_printer.md) | 424 | ## [Thermal Printer](feature_thermal_printer.md) |
| 425 | 425 | ||
diff --git a/quantum/quantum.c b/quantum/quantum.c index f768f86bc..dd57d7a5e 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -346,28 +346,60 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 346 | } | 346 | } |
| 347 | return false; | 347 | return false; |
| 348 | case RGB_HUI: | 348 | case RGB_HUI: |
| 349 | rgblight_increase_hue(); | 349 | if (shifted) { |
| 350 | rgblight_decrease_hue(); | ||
| 351 | } else { | ||
| 352 | rgblight_increase_hue(); | ||
| 353 | } | ||
| 350 | return false; | 354 | return false; |
| 351 | case RGB_HUD: | 355 | case RGB_HUD: |
| 352 | rgblight_decrease_hue(); | 356 | if (shifted) { |
| 357 | rgblight_increase_hue(); | ||
| 358 | } else { | ||
| 359 | rgblight_decrease_hue(); | ||
| 360 | } | ||
| 353 | return false; | 361 | return false; |
| 354 | case RGB_SAI: | 362 | case RGB_SAI: |
| 355 | rgblight_increase_sat(); | 363 | if (shifted) { |
| 364 | rgblight_decrease_sat(); | ||
| 365 | } else { | ||
| 366 | rgblight_increase_sat(); | ||
| 367 | } | ||
| 356 | return false; | 368 | return false; |
| 357 | case RGB_SAD: | 369 | case RGB_SAD: |
| 358 | rgblight_decrease_sat(); | 370 | if (shifted) { |
| 371 | rgblight_increase_sat(); | ||
| 372 | } else { | ||
| 373 | rgblight_decrease_sat(); | ||
| 374 | } | ||
| 359 | return false; | 375 | return false; |
| 360 | case RGB_VAI: | 376 | case RGB_VAI: |
| 361 | rgblight_increase_val(); | 377 | if (shifted) { |
| 378 | rgblight_decrease_val(); | ||
| 379 | } else { | ||
| 380 | rgblight_increase_val(); | ||
| 381 | } | ||
| 362 | return false; | 382 | return false; |
| 363 | case RGB_VAD: | 383 | case RGB_VAD: |
| 364 | rgblight_decrease_val(); | 384 | if (shifted) { |
| 385 | rgblight_increase_val(); | ||
| 386 | } else { | ||
| 387 | rgblight_decrease_val(); | ||
| 388 | } | ||
| 365 | return false; | 389 | return false; |
| 366 | case RGB_SPI: | 390 | case RGB_SPI: |
| 367 | rgblight_increase_speed(); | 391 | if (shifted) { |
| 392 | rgblight_decrease_speed(); | ||
| 393 | } else { | ||
| 394 | rgblight_increase_speed(); | ||
| 395 | } | ||
| 368 | return false; | 396 | return false; |
| 369 | case RGB_SPD: | 397 | case RGB_SPD: |
| 370 | rgblight_decrease_speed(); | 398 | if (shifted) { |
| 399 | rgblight_increase_speed(); | ||
| 400 | } else { | ||
| 401 | rgblight_decrease_speed(); | ||
| 402 | } | ||
| 371 | return false; | 403 | return false; |
| 372 | case RGB_MODE_PLAIN: | 404 | case RGB_MODE_PLAIN: |
| 373 | rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); | 405 | rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); |
