summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorManna Harbour <51143715+manna-harbour@users.noreply.github.com>2019-11-29 09:00:29 +1100
committerJoel Challis <git@zvecr.com>2019-11-28 22:00:29 +0000
commitf9521ffa21c71ed1d5c5e3c72a0d193594d0430f (patch)
tree2a43c9205549d0e410d1995ad76b2a79d555ac42 /quantum
parent2048df883200589c20dfc581e39e03703edf0b23 (diff)
downloadqmk_firmware-f9521ffa21c71ed1d5c5e3c72a0d193594d0430f.tar.gz
qmk_firmware-f9521ffa21c71ed1d5c5e3c72a0d193594d0430f.zip
Add shift-to-invert to remaining directional RGB_* keycode pairs (#7484)
* Add shift-to-invert to remaining directional RGB_* keycode pairs RGB_MODE_FORWARD / RGB_MODE_REVERSE invert their functions when shift is held. This change adds the same capabilities to the remaining directional RGB_* keycode pairs. This improves consistency and provides full RGB control in a keymap containing only one keycode from each pair. * remove redundant variable * fix typo * Fix more typos Flyspell is on now I swear!
Diffstat (limited to 'quantum')
-rw-r--r--quantum/quantum.c48
1 files changed, 40 insertions, 8 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index f768f86bc2..dd57d7a5e9 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -346,28 +346,60 @@ bool process_record_quantum(keyrecord_t *record) {
}
return false;
case RGB_HUI:
- rgblight_increase_hue();
+ if (shifted) {
+ rgblight_decrease_hue();
+ } else {
+ rgblight_increase_hue();
+ }
return false;
case RGB_HUD:
- rgblight_decrease_hue();
+ if (shifted) {
+ rgblight_increase_hue();
+ } else {
+ rgblight_decrease_hue();
+ }
return false;
case RGB_SAI:
- rgblight_increase_sat();
+ if (shifted) {
+ rgblight_decrease_sat();
+ } else {
+ rgblight_increase_sat();
+ }
return false;
case RGB_SAD:
- rgblight_decrease_sat();
+ if (shifted) {
+ rgblight_increase_sat();
+ } else {
+ rgblight_decrease_sat();
+ }
return false;
case RGB_VAI:
- rgblight_increase_val();
+ if (shifted) {
+ rgblight_decrease_val();
+ } else {
+ rgblight_increase_val();
+ }
return false;
case RGB_VAD:
- rgblight_decrease_val();
+ if (shifted) {
+ rgblight_increase_val();
+ } else {
+ rgblight_decrease_val();
+ }
return false;
case RGB_SPI:
- rgblight_increase_speed();
+ if (shifted) {
+ rgblight_decrease_speed();
+ } else {
+ rgblight_increase_speed();
+ }
return false;
case RGB_SPD:
- rgblight_decrease_speed();
+ if (shifted) {
+ rgblight_increase_speed();
+ } else {
+ rgblight_decrease_speed();
+ }
return false;
case RGB_MODE_PLAIN:
rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT);