diff options
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/quantum.c | 12 | ||||
| -rw-r--r-- | quantum/quantum_keycodes.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c index a1a1a9d1c..23873852f 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c | |||
| @@ -290,6 +290,18 @@ bool process_record_quantum(keyrecord_t *record) { | |||
| 290 | rgblight_step(); | 290 | rgblight_step(); |
| 291 | } | 291 | } |
| 292 | return false; | 292 | return false; |
| 293 | case RGB_SMOD: | ||
| 294 | // same as RBG_MOD, but if shift is pressed, it will use the reverese direction instead. | ||
| 295 | if (record->event.pressed) { | ||
| 296 | uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)); | ||
| 297 | if(shifted) { | ||
| 298 | rgblight_step_reverse(); | ||
| 299 | } | ||
| 300 | else { | ||
| 301 | rgblight_step(); | ||
| 302 | } | ||
| 303 | } | ||
| 304 | return false; | ||
| 293 | case RGB_HUI: | 305 | case RGB_HUI: |
| 294 | if (record->event.pressed) { | 306 | if (record->event.pressed) { |
| 295 | rgblight_increase_hue(); | 307 | rgblight_increase_hue(); |
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 212fdc67d..c3c5f1656 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h | |||
| @@ -400,6 +400,7 @@ enum quantum_keycodes { | |||
| 400 | // RGB functionality | 400 | // RGB functionality |
| 401 | RGB_TOG, | 401 | RGB_TOG, |
| 402 | RGB_MOD, | 402 | RGB_MOD, |
| 403 | RGB_SMOD, | ||
| 403 | RGB_HUI, | 404 | RGB_HUI, |
| 404 | RGB_HUD, | 405 | RGB_HUD, |
| 405 | RGB_SAI, | 406 | RGB_SAI, |
