1
0
Fork 0

[Keymap][Xulkal] User code update (#6752)

* Updating rgb menu behavior

* Fixing toggle keycode to work how I want it

* Enabling auto scroll timeout
This commit is contained in:
XScorpion2 2019-09-17 12:28:02 -05:00 committed by Drashna Jaelre
parent 2493eecc7b
commit c427023b31
3 changed files with 16 additions and 12 deletions

View file

@ -28,3 +28,7 @@
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define DISABLE_RGB_MATRIX_SPLASH #define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_SOLID_SPLASH #define DISABLE_RGB_MATRIX_SOLID_SPLASH
// 20m timeout (20m * 60s * 1000mil)
#define RGB_DISABLE_TIMEOUT 1200000
#define OLED_SCROLL_TIMEOUT 20000

View file

@ -10,17 +10,17 @@ void rgb_matrix_increase_flags(void)
} }
break; break;
case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: {
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_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom(); rgb_matrix_disable_noeeprom();
} }
break; break;
default: { case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_ALL); rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_enable_noeeprom(); rgb_matrix_enable_noeeprom();
} }
break; break;
@ -31,8 +31,8 @@ void rgb_matrix_decrease_flags(void)
{ {
switch (rgb_matrix_get_flags()) { switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: { case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_NONE); rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_disable_noeeprom(); rgb_matrix_set_color_all(0, 0, 0);
} }
break; break;
case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: {
@ -41,12 +41,12 @@ void rgb_matrix_decrease_flags(void)
} }
break; break;
case LED_FLAG_UNDERGLOW: { case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_set_color_all(0, 0, 0); rgb_matrix_disable_noeeprom();
} }
break; break;
default: { default: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER);
rgb_matrix_enable_noeeprom(); rgb_matrix_enable_noeeprom();
} }
break; break;

View file

@ -40,7 +40,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
#ifdef RGB_MATRIX_TOG_LAYERS #ifdef RGB_MATRIX_TOG_LAYERS
case RGB_TOG: case RGB_TOG:
if (record->event.pressed) { if (record->event.pressed) {
rgb_matrix_decrease_flags(); rgb_matrix_increase_flags();
} }
return false; return false;
#endif #endif