Skip to content

Commit

Permalink
[Keymap][Xulkal] User code update (#6752)
Browse files Browse the repository at this point in the history
* Updating rgb menu behavior

* Fixing toggle keycode to work how I want it

* Enabling auto scroll timeout
  • Loading branch information
XScorpion2 authored and drashna committed Sep 17, 2019
1 parent 2493eec commit c427023
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
4 changes: 4 additions & 0 deletions users/xulkal/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@
#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
#define DISABLE_RGB_MATRIX_SPLASH
#define DISABLE_RGB_MATRIX_SOLID_SPLASH

// 20m timeout (20m * 60s * 1000mil)
#define RGB_DISABLE_TIMEOUT 1200000
#define OLED_SCROLL_TIMEOUT 20000
20 changes: 10 additions & 10 deletions users/xulkal/custom_rgb.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ void rgb_matrix_increase_flags(void)
}
break;
case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_ALL);
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_enable_noeeprom();
}
break;
Expand All @@ -31,8 +31,8 @@ void rgb_matrix_decrease_flags(void)
{
switch (rgb_matrix_get_flags()) {
case LED_FLAG_ALL: {
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_color_all(0, 0, 0);
}
break;
case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: {
Expand All @@ -41,12 +41,12 @@ void rgb_matrix_decrease_flags(void)
}
break;
case LED_FLAG_UNDERGLOW: {
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER);
rgb_matrix_set_color_all(0, 0, 0);
rgb_matrix_set_flags(LED_FLAG_NONE);
rgb_matrix_disable_noeeprom();
}
break;
default: {
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER);
rgb_matrix_enable_noeeprom();
}
break;
Expand Down
2 changes: 1 addition & 1 deletion users/xulkal/process_records.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record)
#ifdef RGB_MATRIX_TOG_LAYERS
case RGB_TOG:
if (record->event.pressed) {
rgb_matrix_decrease_flags();
rgb_matrix_increase_flags();
}
return false;
#endif
Expand Down

0 comments on commit c427023

Please sign in to comment.