aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/quantum.c
diff options
context:
space:
mode:
authorGravatar Jack Humbert <jack.humb@gmail.com>2016-07-08 08:34:27 -0400
committerGravatar GitHub <noreply@github.com>2016-07-08 08:34:27 -0400
commita9979c6f4232f48713b1b2cdbef927c3038d1ad4 (patch)
treeb218c0f58a852bde752a66100e4e46da5ee3e2b3 /quantum/quantum.c
parente8719e10c4395102f8e252c8377e2f19a18ee74d (diff)
parent564c743aa025c094f9c31ba2049aa50e15d76ab7 (diff)
downloadqmk_firmware-a9979c6f4232f48713b1b2cdbef927c3038d1ad4.tar.gz
Merge pull request #493 from TerryMathews/master
Create keycodes for RGB control functions
Diffstat (limited to 'quantum/quantum.c')
-rw-r--r--quantum/quantum.c54
1 files changed, 52 insertions, 2 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index d8e43a465..09daa4712 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -93,16 +93,66 @@ bool process_record_quantum(keyrecord_t *record) {
*(uint16_t *)0x0800 = 0x7777; // these two are a-star-specific
#endif
bootloader_jump();
- return false;
}
+ return false;
break;
case DEBUG:
if (record->event.pressed) {
print("\nDEBUG: enabled.\n");
debug_enable = true;
- return false;
}
+ return false;
+ break;
+ #ifdef RGBLIGHT_ENABLE
+ case RGB_TOG:
+ if (record->event.pressed) {
+ rgblight_toggle();
+ }
+ return false;
+ break;
+ case RGB_MOD:
+ if (record->event.pressed) {
+ rgblight_step();
+ }
+ return false;
+ break;
+ case RGB_HUI:
+ if (record->event.pressed) {
+ rgblight_increase_hue();
+ }
+ return false;
+ break;
+ case RGB_HUD:
+ if (record->event.pressed) {
+ rgblight_decrease_hue();
+ }
+ return false;
+ break;
+ case RGB_SAI:
+ if (record->event.pressed) {
+ rgblight_increase_sat();
+ }
+ return false;
+ break;
+ case RGB_SAD:
+ if (record->event.pressed) {
+ rgblight_decrease_sat();
+ }
+ return false;
+ break;
+ case RGB_VAI:
+ if (record->event.pressed) {
+ rgblight_increase_val();
+ }
+ return false;
+ break;
+ case RGB_VAD:
+ if (record->event.pressed) {
+ rgblight_decrease_val();
+ }
+ return false;
break;
+ #endif
case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_UNSWAP_ALT_GUI:
if (record->event.pressed) {
// MAGIC actions (BOOTMAGIC without the boot)