summaryrefslogtreecommitdiff
path: root/keyboards/massdrop/ctrl/keymaps/default
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/massdrop/ctrl/keymaps/default')
-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 182abbbad4..53c96d95d0 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) {
}
}
return false;
+ case RGB_TOG:
+ if (record->event.pressed) {
+ switch (rgb_matrix_get_flags()) {
+ case LED_FLAG_ALL: {
+ rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
+ rgb_matrix_set_color_all(0, 0, 0);
+ }
+ break;
+ case LED_FLAG_KEYLIGHT: {
+ rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
+ rgb_matrix_set_color_all(0, 0, 0);
+ }
+ break;
+ case LED_FLAG_UNDERGLOW: {
+ rgb_matrix_set_flags(LED_FLAG_NONE);
+ rgb_matrix_disable_noeeprom();
+ }
+ break;
+ default: {
+ rgb_matrix_set_flags(LED_FLAG_ALL);
+ rgb_matrix_enable_noeeprom();
+ }
+ break;
+ }
+ }
+ return false;
default:
return true; //Process all other keycodes normally
}