aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/ergodox_ez/keymaps/default/keymap.c
diff options
context:
space:
mode:
authorGravatar Erez Zukerman <ezukerman@godaddy.com>2017-11-06 09:00:05 -0500
committerGravatar Jack Humbert <jack.humb@gmail.com>2017-11-06 09:19:51 -0500
commite45290a62e117c970155b992b34b2bb3cc8412f2 (patch)
tree5613501a9e173198727c39110a3e30a6027c8449 /keyboards/ergodox_ez/keymaps/default/keymap.c
parent1d3a19757c7b91230e4e7c54f7e41755fc4767a5 (diff)
downloadqmk_firmware-e45290a62e117c970155b992b34b2bb3cc8412f2.tar.gz
adds indication up to layer 7
Diffstat (limited to 'keyboards/ergodox_ez/keymaps/default/keymap.c')
-rw-r--r--keyboards/ergodox_ez/keymaps/default/keymap.c94
1 files changed, 58 insertions, 36 deletions
diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c
index e0f6e21b2..d2976812f 100644
--- a/keyboards/ergodox_ez/keymaps/default/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/default/keymap.c
@@ -211,41 +211,63 @@ uint32_t layer_state_set_user(uint32_t state) {
uint8_t layer = biton32(state);
switch (layer) {
- case 0:
- #ifdef RGBLIGHT_COLOR_LAYER_0
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
- #else
- rgblight_init();
- #endif
- break;
- case 1:
- ergodox_right_led_1_on();
- #ifdef RGBLIGHT_COLOR_LAYER_1
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
- #endif
- break;
- case 2:
- ergodox_right_led_2_on();
- #ifdef RGBLIGHT_COLOR_LAYER_2
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
- #endif
- break;
- case 3:
- #ifdef RGBLIGHT_COLOR_LAYER_3
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
- #endif
- break;
- case 4:
- #ifdef RGBLIGHT_COLOR_LAYER_4
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
- #endif
- break;
- case 5:
- #ifdef RGBLIGHT_COLOR_LAYER_5
- rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
- #endif
- break;
- }
+ case 0:
+ #ifdef RGBLIGHT_COLOR_LAYER_0
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_0);
+ #else
+ rgblight_init();
+ #endif
+ break;
+ case 1:
+ ergodox_right_led_1_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_1
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_1);
+ #endif
+ break;
+ case 2:
+ ergodox_right_led_2_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_2
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_2);
+ #endif
+ break;
+ case 3:
+ ergodox_right_led_3_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_3
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_3);
+ #endif
+ break;
+ case 4:
+ ergodox_right_led_1_on();
+ ergodox_right_led_2_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_4
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_4);
+ #endif
+ break;
+ case 5:
+ ergodox_right_led_1_on();
+ ergodox_right_led_3_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_5
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_5);
+ #endif
+ break;
+ case 6:
+ ergodox_right_led_2_on();
+ ergodox_right_led_3_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_6
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
+ #endif
+ break;
+ case 7:
+ ergodox_right_led_1_on();
+ ergodox_right_led_2_on();
+ ergodox_right_led_3_on();
+ #ifdef RGBLIGHT_COLOR_LAYER_7
+ rgblight_setrgb(RGBLIGHT_COLOR_LAYER_6);
+ #endif
+ break;
+ default:
+ break;
+ }
return state;
-}; \ No newline at end of file
+};