summaryrefslogtreecommitdiff
path: root/keyboards/mechlovin/adelais/keymaps/via/keymap.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-08-12 17:44:33 -0700
committerGitHub <noreply@github.com>2022-08-13 01:44:33 +0100
commitea2ec5835b0b9f9f93f0fbee079b1852c4aae4c2 (patch)
treeb69a4efb189670ae7619e6e250197019b4991a94 /keyboards/mechlovin/adelais/keymaps/via/keymap.c
parenta1fe9fe3b32c5559b467cfb2466740285a877eff (diff)
[Keyboard] Fix compilation issues for Mechlovin Adelais (#18019)
Diffstat (limited to 'keyboards/mechlovin/adelais/keymaps/via/keymap.c')
-rw-r--r--keyboards/mechlovin/adelais/keymaps/via/keymap.c82
1 files changed, 41 insertions, 41 deletions
diff --git a/keyboards/mechlovin/adelais/keymaps/via/keymap.c b/keyboards/mechlovin/adelais/keymaps/via/keymap.c
index e9ed9b6a36..f38d7b2e57 100644
--- a/keyboards/mechlovin/adelais/keymaps/via/keymap.c
+++ b/keyboards/mechlovin/adelais/keymaps/via/keymap.c
@@ -65,15 +65,13 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
} else {
tap_code(KC_VOLU);
}
- }
- else if (index == 1) {
+ } else if (index == 1) {
if (clockwise) {
tap_code(KC_LEFT);
} else {
tap_code(KC_RGHT);
}
- }
- else if (index == 2) {
+ } else if (index == 2) {
if (clockwise) {
tap_code(KC_UP);
} else {
@@ -83,44 +81,46 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
return true;
}
- #endif
+#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- if (record->event.pressed) {
- switch(keycode) {
- case BL_TOG: // toggle rgb matrix
- rgb_matrix_toggle();
- return false;
- case BL_EFFECT:
- rgb_matrix_step();
- return false;
- case BL_ISPD:
- rgb_matrix_increase_speed();
- return false;
- case BL_DSPD:
- rgb_matrix_decrease_speed();
- return false;
- case BL_IHUE:
- rgb_matrix_increase_hue();
- return false;
- case BL_DHUE:
- rgb_matrix_decrease_hue();
- return false;
- case BL_ISAT:
- rgb_matrix_increase_sat();
- return false;
- case BL_DSAT:
- rgb_matrix_decrease_sat();
- return false;
- case BL_IVAL:
- rgb_matrix_increase_val();
- return false;
- case BL_DVAL:
- rgb_matrix_decrease_val();
- return false;
- default:
- break;
+ if (record->event.pressed) {
+ switch (keycode) {
+#ifdef RGB_MATRIX_ENABLE
+ case BL_TOG: // toggle rgb matrix
+ rgb_matrix_toggle();
+ return false;
+ case BL_EFFECT:
+ rgb_matrix_step();
+ return false;
+ case BL_ISPD:
+ rgb_matrix_increase_speed();
+ return false;
+ case BL_DSPD:
+ rgb_matrix_decrease_speed();
+ return false;
+ case BL_IHUE:
+ rgb_matrix_increase_hue();
+ return false;
+ case BL_DHUE:
+ rgb_matrix_decrease_hue();
+ return false;
+ case BL_ISAT:
+ rgb_matrix_increase_sat();
+ return false;
+ case BL_DSAT:
+ rgb_matrix_decrease_sat();
+ return false;
+ case BL_IVAL:
+ rgb_matrix_increase_val();
+ return false;
+ case BL_DVAL:
+ rgb_matrix_decrease_val();
+ return false;
+#endif
+ default:
+ break;
+ }
}
- }
- return true;
+ return true;
}