aboutsummaryrefslogtreecommitdiff
path: root/keyboards/massdrop/ctrl/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/massdrop/ctrl/keymaps/default/keymap.c')
-rw-r--r--keyboards/massdrop/ctrl/keymaps/default/keymap.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c
index 182abbbad..53c96d95d 100644
--- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c
+++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c
@@ -98,6 +98,32 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
98 } 98 }
99 } 99 }
100 return false; 100 return false;
101 case RGB_TOG:
102 if (record->event.pressed) {
103 switch (rgb_matrix_get_flags()) {
104 case LED_FLAG_ALL: {
105 rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
106 rgb_matrix_set_color_all(0, 0, 0);
107 }
108 break;
109 case LED_FLAG_KEYLIGHT: {
110 rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
111 rgb_matrix_set_color_all(0, 0, 0);
112 }
113 break;
114 case LED_FLAG_UNDERGLOW: {
115 rgb_matrix_set_flags(LED_FLAG_NONE);
116 rgb_matrix_disable_noeeprom();
117 }
118 break;
119 default: {
120 rgb_matrix_set_flags(LED_FLAG_ALL);
121 rgb_matrix_enable_noeeprom();
122 }
123 break;
124 }
125 }
126 return false;
101 default: 127 default:
102 return true; //Process all other keycodes normally 128 return true; //Process all other keycodes normally
103 } 129 }