aboutsummaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-09-29 16:43:34 +0000
committerQMK Bot <hello@qmk.fm>2021-09-29 16:43:34 +0000
commit4b77a8719ae7c095072ef41c5083153175b52266 (patch)
tree21a04189739693493cfc6cff7abd55e9ff5b056f /users
parentf58095fab7c6c0b36c4ef325737bdb009f8c1433 (diff)
parentc89f74b929721d01bf8177aa10c3cd721247a857 (diff)
downloadqmk_firmware-4b77a8719ae7c095072ef41c5083153175b52266.tar.gz
qmk_firmware-4b77a8719ae7c095072ef41c5083153175b52266.zip
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'users')
-rw-r--r--users/jonavin/jonavin.c64
-rw-r--r--users/jonavin/jonavin.h12
2 files changed, 75 insertions, 1 deletions
diff --git a/users/jonavin/jonavin.c b/users/jonavin/jonavin.c
index 6ecadc7b4..f53aa8664 100644
--- a/users/jonavin/jonavin.c
+++ b/users/jonavin/jonavin.c
@@ -160,6 +160,70 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
160 } 160 }
161 } 161 }
162 } 162 }
163
164 #ifdef RGB_MATRIX_ENABLE
165 void encoder_action_rgb_speed(bool clockwise) {
166 if (clockwise)
167 rgb_matrix_increase_speed_noeeprom();
168 else
169 rgb_matrix_decrease_speed_noeeprom();
170 }
171 void encoder_action_rgb_hue(bool clockwise) {
172 if (clockwise)
173 rgb_matrix_increase_hue_noeeprom();
174 else
175 rgb_matrix_decrease_hue_noeeprom();
176 }
177 void encoder_action_rgb_saturation(bool clockwise) {
178 if (clockwise)
179 rgb_matrix_increase_sat_noeeprom();
180 else
181 rgb_matrix_decrease_sat_noeeprom();
182 }
183 void encoder_action_rgb_brightness(bool clockwise) {
184 if (clockwise)
185 rgb_matrix_increase_val_noeeprom();
186 else
187 rgb_matrix_decrease_val_noeeprom();
188 }
189 void encoder_action_rgb_mode(bool clockwise) {
190 if (clockwise)
191 rgb_matrix_step_noeeprom();
192 else
193 rgb_matrix_step_reverse_noeeprom();
194 }
195 #elif defined(RGBLIGHT_ENABLE)
196 void encoder_action_rgb_speed(bool clockwise) {
197 if (clockwise)
198 rgblight_increase_speed_noeeprom();
199 else
200 rgblight_decrease_speed_noeeprom();
201 }
202 void encoder_action_rgb_hue(bool clockwise) {
203 if (clockwise)
204 rgblight_increase_hue_noeeprom();
205 else
206 rgblight_decrease_hue_noeeprom();
207 }
208 void encoder_action_rgb_saturation(bool clockwise) {
209 if (clockwise)
210 rgblight_increase_sat_noeeprom();
211 else
212 rgblight_decrease_sat_noeeprom();
213 }
214 void encoder_action_rgb_brightness(bool clockwise) {
215 if (clockwise)
216 rgblight_increase_val_noeeprom();
217 else
218 rgblight_decrease_val_noeeprom();
219 }
220 void encoder_action_rgb_mode(bool clockwise) {
221 if (clockwise)
222 rgblight_step_noeeprom();
223 else
224 rgblight_step_reverse_noeeprom();
225 }
226 #endif // RGB_MATRIX_ENABLE || RGBLIGHT_ENABLE
163#endif // ENCODER_ENABLE 227#endif // ENCODER_ENABLE
164 228
165#if defined(ENCODER_ENABLE) && defined(ENCODER_DEFAULTACTIONS_ENABLE) // Encoder Functionality 229#if defined(ENCODER_ENABLE) && defined(ENCODER_DEFAULTACTIONS_ENABLE) // Encoder Functionality
diff --git a/users/jonavin/jonavin.h b/users/jonavin/jonavin.h
index 316483940..efe0301af 100644
--- a/users/jonavin/jonavin.h
+++ b/users/jonavin/jonavin.h
@@ -36,7 +36,9 @@ enum custom_user_keycodes {
36 KC_WINLCK, //Toggles Win key on and off 36 KC_WINLCK, //Toggles Win key on and off
37 RGB_TOI, // Timeout idle time up 37 RGB_TOI, // Timeout idle time up
38 RGB_TOD, // Timeout idle time down 38 RGB_TOD, // Timeout idle time down
39 RGB_NITE // Turns off all rgb but allow rgb indicators to work 39 RGB_NITE, // Turns off all rgb but allow rgb indicators to work
40
41 NEW_SAFE_RANGE // new safe range for keymap level custom keycodes
40}; 42};
41 43
42#define KC_CAD LALT(LCTL(KC_DEL)) 44#define KC_CAD LALT(LCTL(KC_DEL))
@@ -67,6 +69,14 @@ enum custom_user_keycodes {
67 69
68 uint8_t get_selected_layer(void); 70 uint8_t get_selected_layer(void);
69 void encoder_action_layerchange(bool clockwise); 71 void encoder_action_layerchange(bool clockwise);
72
73 #if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE)
74 void encoder_action_rgb_speed(bool clockwise);
75 void encoder_action_rgb_hue(bool clockwise);
76 void encoder_action_rgb_saturation(bool clockwise);
77 void encoder_action_rgb_brightness(bool clockwise);
78 void encoder_action_rgb_mode(bool clockwise);
79 #endif // RGB_MATRIX_ENABLE / RGBLIGHT_ENABLE
70#endif // ENCODER_ENABLE 80#endif // ENCODER_ENABLE
71 81
72 82