diff options
| author | XScorpion2 <rcalt2vt@gmail.com> | 2019-09-17 12:28:02 -0500 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2019-09-17 10:28:02 -0700 |
| commit | c427023b31f544771391b4cd22d797ee14cadac3 (patch) | |
| tree | 25076e5bad3a6ab568280cd39feee3c731c99c7e | |
| parent | 2493eecc7b318193263dc410fae9a010a6dde574 (diff) | |
| download | qmk_firmware-c427023b31f544771391b4cd22d797ee14cadac3.tar.gz qmk_firmware-c427023b31f544771391b4cd22d797ee14cadac3.zip | |
[Keymap][Xulkal] User code update (#6752)
* Updating rgb menu behavior
* Fixing toggle keycode to work how I want it
* Enabling auto scroll timeout
| -rw-r--r-- | users/xulkal/config.h | 4 | ||||
| -rw-r--r-- | users/xulkal/custom_rgb.c | 20 | ||||
| -rw-r--r-- | users/xulkal/process_records.c | 2 |
3 files changed, 15 insertions, 11 deletions
diff --git a/users/xulkal/config.h b/users/xulkal/config.h index c794530d4..4b05ea4ec 100644 --- a/users/xulkal/config.h +++ b/users/xulkal/config.h | |||
| @@ -28,3 +28,7 @@ | |||
| 28 | #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | 28 | #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS |
| 29 | #define DISABLE_RGB_MATRIX_SPLASH | 29 | #define DISABLE_RGB_MATRIX_SPLASH |
| 30 | #define DISABLE_RGB_MATRIX_SOLID_SPLASH | 30 | #define DISABLE_RGB_MATRIX_SOLID_SPLASH |
| 31 | |||
| 32 | // 20m timeout (20m * 60s * 1000mil) | ||
| 33 | #define RGB_DISABLE_TIMEOUT 1200000 | ||
| 34 | #define OLED_SCROLL_TIMEOUT 20000 | ||
diff --git a/users/xulkal/custom_rgb.c b/users/xulkal/custom_rgb.c index 11bfad1d7..f68a7c56c 100644 --- a/users/xulkal/custom_rgb.c +++ b/users/xulkal/custom_rgb.c | |||
| @@ -10,17 +10,17 @@ void rgb_matrix_increase_flags(void) | |||
| 10 | } | 10 | } |
| 11 | break; | 11 | break; |
| 12 | case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { | 12 | case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { |
| 13 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | 13 | rgb_matrix_set_flags(LED_FLAG_NONE); |
| 14 | rgb_matrix_set_color_all(0, 0, 0); | 14 | rgb_matrix_disable_noeeprom(); |
| 15 | } | 15 | } |
| 16 | break; | 16 | break; |
| 17 | case LED_FLAG_UNDERGLOW: { | 17 | case LED_FLAG_UNDERGLOW: { |
| 18 | rgb_matrix_set_flags(LED_FLAG_NONE); | 18 | rgb_matrix_set_flags(LED_FLAG_ALL); |
| 19 | rgb_matrix_disable_noeeprom(); | 19 | rgb_matrix_set_color_all(0, 0, 0); |
| 20 | } | 20 | } |
| 21 | break; | 21 | break; |
| 22 | default: { | 22 | default: { |
| 23 | rgb_matrix_set_flags(LED_FLAG_ALL); | 23 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); |
| 24 | rgb_matrix_enable_noeeprom(); | 24 | rgb_matrix_enable_noeeprom(); |
| 25 | } | 25 | } |
| 26 | break; | 26 | break; |
| @@ -31,8 +31,8 @@ void rgb_matrix_decrease_flags(void) | |||
| 31 | { | 31 | { |
| 32 | switch (rgb_matrix_get_flags()) { | 32 | switch (rgb_matrix_get_flags()) { |
| 33 | case LED_FLAG_ALL: { | 33 | case LED_FLAG_ALL: { |
| 34 | rgb_matrix_set_flags(LED_FLAG_NONE); | 34 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); |
| 35 | rgb_matrix_disable_noeeprom(); | 35 | rgb_matrix_set_color_all(0, 0, 0); |
| 36 | } | 36 | } |
| 37 | break; | 37 | break; |
| 38 | case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { | 38 | case LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER: { |
| @@ -41,12 +41,12 @@ void rgb_matrix_decrease_flags(void) | |||
| 41 | } | 41 | } |
| 42 | break; | 42 | break; |
| 43 | case LED_FLAG_UNDERGLOW: { | 43 | case LED_FLAG_UNDERGLOW: { |
| 44 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); | 44 | rgb_matrix_set_flags(LED_FLAG_NONE); |
| 45 | rgb_matrix_set_color_all(0, 0, 0); | 45 | rgb_matrix_disable_noeeprom(); |
| 46 | } | 46 | } |
| 47 | break; | 47 | break; |
| 48 | default: { | 48 | default: { |
| 49 | rgb_matrix_set_flags(LED_FLAG_UNDERGLOW); | 49 | rgb_matrix_set_flags(LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER); |
| 50 | rgb_matrix_enable_noeeprom(); | 50 | rgb_matrix_enable_noeeprom(); |
| 51 | } | 51 | } |
| 52 | break; | 52 | break; |
diff --git a/users/xulkal/process_records.c b/users/xulkal/process_records.c index 9c0274823..ca2376145 100644 --- a/users/xulkal/process_records.c +++ b/users/xulkal/process_records.c | |||
| @@ -40,7 +40,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) | |||
| 40 | #ifdef RGB_MATRIX_TOG_LAYERS | 40 | #ifdef RGB_MATRIX_TOG_LAYERS |
| 41 | case RGB_TOG: | 41 | case RGB_TOG: |
| 42 | if (record->event.pressed) { | 42 | if (record->event.pressed) { |
| 43 | rgb_matrix_decrease_flags(); | 43 | rgb_matrix_increase_flags(); |
| 44 | } | 44 | } |
| 45 | return false; | 45 | return false; |
| 46 | #endif | 46 | #endif |
