aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/keymap.h10
-rw-r--r--quantum/quantum.c50
2 files changed, 60 insertions, 0 deletions
diff --git a/quantum/keymap.h b/quantum/keymap.h
index 73f99f821..a15865183 100644
--- a/quantum/keymap.h
+++ b/quantum/keymap.h
@@ -156,6 +156,16 @@ enum quantum_keycodes {
156 BL_INC, 156 BL_INC,
157 BL_TOGG, 157 BL_TOGG,
158 BL_STEP, 158 BL_STEP,
159
160 // RGB functionality
161 RGB_TOG,
162 RGB_MOD,
163 RGB_HUI,
164 RGB_HUD,
165 RGB_SAI,
166 RGB_SAD,
167 RGB_VAI,
168 RGB_VAD,
159 169
160 // Left shift, open paren 170 // Left shift, open paren
161 KC_LSPO, 171 KC_LSPO,
diff --git a/quantum/quantum.c b/quantum/quantum.c
index d8e43a465..5c0b53e22 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -103,6 +103,56 @@ bool process_record_quantum(keyrecord_t *record) {
103 return false; 103 return false;
104 } 104 }
105 break; 105 break;
106 #ifdef RGBLIGHT_ENABLE
107 case RGB_TOG:
108 if (record->event.pressed) {
109 rgblight_toggle();
110 return false;
111 }
112 break;
113 case RGB_MOD:
114 if (record->event.pressed) {
115 rgblight_step();
116 return false;
117 }
118 break;
119 case RGB_HUI:
120 if (record->event.pressed) {
121 rgblight_increase_hue();
122 return false;
123 }
124 break;
125 case RGB_HUD:
126 if (record->event.pressed) {
127 rgblight_decrease_hue();
128 return false;
129 }
130 break;
131 case RGB_SAI:
132 if (record->event.pressed) {
133 rgblight_increase_sat();
134 return false;
135 }
136 break;
137 case RGB_SAD:
138 if (record->event.pressed) {
139 rgblight_decrease_sat();
140 return false;
141 }
142 break;
143 case RGB_VAI:
144 if (record->event.pressed) {
145 rgblight_increase_val();
146 return false;
147 }
148 break;
149 case RGB_VAD:
150 if (record->event.pressed) {
151 rgblight_decrease_val();
152 return false;
153 }
154 break;
155 #endif
106 case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_UNSWAP_ALT_GUI: 156 case MAGIC_SWAP_CONTROL_CAPSLOCK ... MAGIC_UNSWAP_ALT_GUI:
107 if (record->event.pressed) { 157 if (record->event.pressed) {
108 // MAGIC actions (BOOTMAGIC without the boot) 158 // MAGIC actions (BOOTMAGIC without the boot)