summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
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 6ecadc7b47..f53aa8664e 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/>.
}
}
}
+
+ #ifdef RGB_MATRIX_ENABLE
+ void encoder_action_rgb_speed(bool clockwise) {
+ if (clockwise)
+ rgb_matrix_increase_speed_noeeprom();
+ else
+ rgb_matrix_decrease_speed_noeeprom();
+ }
+ void encoder_action_rgb_hue(bool clockwise) {
+ if (clockwise)
+ rgb_matrix_increase_hue_noeeprom();
+ else
+ rgb_matrix_decrease_hue_noeeprom();
+ }
+ void encoder_action_rgb_saturation(bool clockwise) {
+ if (clockwise)
+ rgb_matrix_increase_sat_noeeprom();
+ else
+ rgb_matrix_decrease_sat_noeeprom();
+ }
+ void encoder_action_rgb_brightness(bool clockwise) {
+ if (clockwise)
+ rgb_matrix_increase_val_noeeprom();
+ else
+ rgb_matrix_decrease_val_noeeprom();
+ }
+ void encoder_action_rgb_mode(bool clockwise) {
+ if (clockwise)
+ rgb_matrix_step_noeeprom();
+ else
+ rgb_matrix_step_reverse_noeeprom();
+ }
+ #elif defined(RGBLIGHT_ENABLE)
+ void encoder_action_rgb_speed(bool clockwise) {
+ if (clockwise)
+ rgblight_increase_speed_noeeprom();
+ else
+ rgblight_decrease_speed_noeeprom();
+ }
+ void encoder_action_rgb_hue(bool clockwise) {
+ if (clockwise)
+ rgblight_increase_hue_noeeprom();
+ else
+ rgblight_decrease_hue_noeeprom();
+ }
+ void encoder_action_rgb_saturation(bool clockwise) {
+ if (clockwise)
+ rgblight_increase_sat_noeeprom();
+ else
+ rgblight_decrease_sat_noeeprom();
+ }
+ void encoder_action_rgb_brightness(bool clockwise) {
+ if (clockwise)
+ rgblight_increase_val_noeeprom();
+ else
+ rgblight_decrease_val_noeeprom();
+ }
+ void encoder_action_rgb_mode(bool clockwise) {
+ if (clockwise)
+ rgblight_step_noeeprom();
+ else
+ rgblight_step_reverse_noeeprom();
+ }
+ #endif // RGB_MATRIX_ENABLE || RGBLIGHT_ENABLE
#endif // ENCODER_ENABLE
#if defined(ENCODER_ENABLE) && defined(ENCODER_DEFAULTACTIONS_ENABLE) // Encoder Functionality
diff --git a/users/jonavin/jonavin.h b/users/jonavin/jonavin.h
index 316483940a..efe0301af3 100644
--- a/users/jonavin/jonavin.h
+++ b/users/jonavin/jonavin.h
@@ -36,7 +36,9 @@ enum custom_user_keycodes {
KC_WINLCK, //Toggles Win key on and off
RGB_TOI, // Timeout idle time up
RGB_TOD, // Timeout idle time down
- RGB_NITE // Turns off all rgb but allow rgb indicators to work
+ RGB_NITE, // Turns off all rgb but allow rgb indicators to work
+
+ NEW_SAFE_RANGE // new safe range for keymap level custom keycodes
};
#define KC_CAD LALT(LCTL(KC_DEL))
@@ -67,6 +69,14 @@ enum custom_user_keycodes {
uint8_t get_selected_layer(void);
void encoder_action_layerchange(bool clockwise);
+
+ #if defined(RGB_MATRIX_ENABLE) || defined(RGBLIGHT_ENABLE)
+ void encoder_action_rgb_speed(bool clockwise);
+ void encoder_action_rgb_hue(bool clockwise);
+ void encoder_action_rgb_saturation(bool clockwise);
+ void encoder_action_rgb_brightness(bool clockwise);
+ void encoder_action_rgb_mode(bool clockwise);
+ #endif // RGB_MATRIX_ENABLE / RGBLIGHT_ENABLE
#endif // ENCODER_ENABLE