aboutsummaryrefslogtreecommitdiff
path: root/keyboards/dmqdesign/spin/keymaps/via/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/dmqdesign/spin/keymaps/via/keymap.c')
-rw-r--r--keyboards/dmqdesign/spin/keymaps/via/keymap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/keyboards/dmqdesign/spin/keymaps/via/keymap.c b/keyboards/dmqdesign/spin/keymaps/via/keymap.c
index c3b5ef260..6527cc8fd 100644
--- a/keyboards/dmqdesign/spin/keymaps/via/keymap.c
+++ b/keyboards/dmqdesign/spin/keymaps/via/keymap.c
@@ -45,24 +45,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
45 ) 45 )
46}; 46};
47 47
48void encoder_update_user(uint8_t index, bool clockwise) { 48bool encoder_update_user(uint8_t index, bool clockwise) {
49 if (index == 0) { /* First encoder */ 49 if (index == 0) { /* First encoder */
50 if (clockwise) { 50 if (clockwise) {
51 rgblight_increase_hue(); //Cycle through the RGB hue 51 rgblight_increase_hue(); //Cycle through the RGB hue
52 } else { 52 } else {
53 rgblight_decrease_hue(); 53 rgblight_decrease_hue();
54 } 54 }
55 } else if (index == 1) { /* Second encoder */ 55 } else if (index == 1) { /* Second encoder */
56 if (clockwise) { 56 if (clockwise) {
57 rgblight_increase_sat(); 57 rgblight_increase_sat();
58 } else { 58 } else {
59 rgblight_decrease_sat(); 59 rgblight_decrease_sat();
60 } 60 }
61 } else if (index == 2) { /* Third encoder */ 61 } else if (index == 2) { /* Third encoder */
62 if (clockwise) { 62 if (clockwise) {
63 rgblight_increase_val(); //Change brightness on the RGB LEDs 63 rgblight_increase_val(); //Change brightness on the RGB LEDs
64 } else { 64 } else {
65 rgblight_decrease_val(); 65 rgblight_decrease_val();
66 } 66 }
67 } 67 }
68} \ No newline at end of file 68 return true;
69}