diff options
| author | Akaash Suresh <casa.akaash@gmail.com> | 2020-01-09 13:57:54 -0600 |
|---|---|---|
| committer | Drashna Jaelre <drashna@live.com> | 2020-01-09 11:57:54 -0800 |
| commit | caa70df816033c30dbbbf4c5a90d803c7bb1dfde (patch) | |
| tree | 4246ca4b2808cdd1b8ed681392258f195e579014 /users/curry | |
| parent | 71de09d7510213d707ca1056c6e0eca840678d37 (diff) | |
| download | qmk_firmware-caa70df816033c30dbbbf4c5a90d803c7bb1dfde.tar.gz qmk_firmware-caa70df816033c30dbbbf4c5a90d803c7bb1dfde.zip | |
[Keymap] Userspace refactor, adding leader key functionality (#7790)
* Userspace refactor
* Fixed missed ifdef
* tapcode16, adjust layout
* glcdfont changes from #7745
* Modify Keymaps, add workman
* RGB & OLED update
Diffstat (limited to 'users/curry')
| -rw-r--r-- | users/curry/LICENSE (renamed from users/curry/LICENSE.md) | 0 | ||||
| -rw-r--r-- | users/curry/config.h | 129 | ||||
| -rw-r--r-- | users/curry/curry.c | 19 | ||||
| -rw-r--r-- | users/curry/curry.h | 14 | ||||
| -rw-r--r-- | users/curry/glcdfont.c | 11 | ||||
| -rw-r--r-- | users/curry/leader.c | 24 | ||||
| -rw-r--r-- | users/curry/leader.h | 3 | ||||
| -rw-r--r-- | users/curry/oled.c | 13 | ||||
| -rw-r--r-- | users/curry/process_records.c | 27 | ||||
| -rw-r--r-- | users/curry/process_records.h | 62 | ||||
| -rw-r--r-- | users/curry/rgb_lighting_user.c (renamed from users/curry/rgb_stuff.c) | 274 | ||||
| -rw-r--r-- | users/curry/rgb_lighting_user.h | 19 | ||||
| -rw-r--r-- | users/curry/rgb_matrix_user.c | 144 | ||||
| -rw-r--r-- | users/curry/rgb_matrix_user.h | 7 | ||||
| -rw-r--r-- | users/curry/rgb_stuff.h | 32 | ||||
| -rw-r--r-- | users/curry/rules.mk | 20 | ||||
| -rw-r--r-- | users/curry/tap_dances.c | 1 | ||||
| -rw-r--r-- | users/curry/tap_dances.h | 2 | ||||
| -rw-r--r-- | users/curry/wrappers.h | 30 |
19 files changed, 409 insertions, 422 deletions
diff --git a/users/curry/LICENSE.md b/users/curry/LICENSE index 198ae45b2..198ae45b2 100644 --- a/users/curry/LICENSE.md +++ b/users/curry/LICENSE | |||
diff --git a/users/curry/config.h b/users/curry/config.h index 45b8364e1..b982dab03 100644 --- a/users/curry/config.h +++ b/users/curry/config.h | |||
| @@ -6,97 +6,82 @@ | |||
| 6 | /* Set Polling rate to 1000Hz */ | 6 | /* Set Polling rate to 1000Hz */ |
| 7 | #define USB_POLLING_INTERVAL_MS 1 | 7 | #define USB_POLLING_INTERVAL_MS 1 |
| 8 | 8 | ||
| 9 | #ifdef RGBLIGHT_ENABLE | 9 | #if defined(RGBLIGHT_ENABLE) |
| 10 | # undef RGBLIGHT_ANIMATIONS | 10 | # undef RGBLIGHT_ANIMATIONS |
| 11 | # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) | 11 | # define RGBLIGHT_SLEEP |
| 12 | # define RGBLIGHT_SLEEP | 12 | # define RGBLIGHT_EFFECT_BREATHING |
| 13 | # define RGBLIGHT_EFFECT_BREATHING | 13 | # define RGBLIGHT_EFFECT_SNAKE |
| 14 | # define RGBLIGHT_EFFECT_SNAKE | 14 | # define RGBLIGHT_EFFECT_KNIGHT |
| 15 | # define RGBLIGHT_EFFECT_KNIGHT | ||
| 16 | # else | ||
| 17 | # define RGBLIGHT_ANIMATIONS | ||
| 18 | # endif | ||
| 19 | #endif // RGBLIGHT_ENABLE | 15 | #endif // RGBLIGHT_ENABLE |
| 20 | 16 | ||
| 21 | #ifdef RGB_MATRIX_ENABLE | 17 | #if defined(RGB_MATRIX_ENABLE) |
| 22 | # define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) | 18 | # define RGB_MATRIX_KEYPRESSES |
| 23 | // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) | ||
| 24 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS | 19 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS |
| 25 | // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | 20 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true |
| 26 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | 21 | |
| 27 | // # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 | 22 | # define DISABLE_RGB_MATRIX_ALPHAS_MODS |
| 28 | // # define EECONFIG_RGB_MATRIX (uint32_t *)16 | 23 | # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN |
| 29 | 24 | # define DISABLE_RGB_MATRIX_BREATHING | |
| 30 | # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) | 25 | # define DISABLE_RGB_MATRIX_BAND_SAT |
| 31 | # define DISABLE_RGB_MATRIX_ALPHAS_MODS | 26 | # define DISABLE_RGB_MATRIX_BAND_VAL |
| 32 | # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN | 27 | # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT |
| 33 | # define DISABLE_RGB_MATRIX_BREATHING | 28 | # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL |
| 34 | # define DISABLE_RGB_MATRIX_BAND_SAT | 29 | # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT |
| 35 | # define DISABLE_RGB_MATRIX_BAND_VAL | 30 | # define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL |
| 36 | # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | 31 | # define DISABLE_RGB_MATRIX_CYCLE_ALL |
| 37 | # define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL | 32 | # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT |
| 38 | # define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT | 33 | # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN |
| 39 | # define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL | 34 | # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN |
| 40 | # define DISABLE_RGB_MATRIX_CYCLE_ALL | ||
| 41 | # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | ||
| 42 | # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN | ||
| 43 | # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN | ||
| 44 | // # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | 35 | // # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL |
| 45 | # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | 36 | # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON |
| 46 | # define DISABLE_RGB_MATRIX_DUAL_BEACON | 37 | # define DISABLE_RGB_MATRIX_DUAL_BEACON |
| 47 | # define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL | 38 | # define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL |
| 48 | # define DISABLE_RGB_MATRIX_CYCLE_SPIRAL | 39 | # define DISABLE_RGB_MATRIX_CYCLE_SPIRAL |
| 49 | # define DISABLE_RGB_MATRIX_RAINBOW_BEACON | 40 | # define DISABLE_RGB_MATRIX_RAINBOW_BEACON |
| 50 | # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS | 41 | # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS |
| 51 | # define DISABLE_RGB_MATRIX_RAINDROPS | 42 | # define DISABLE_RGB_MATRIX_RAINDROPS |
| 52 | # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | 43 | # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS |
| 53 | // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP | 44 | // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP |
| 54 | # define DISABLE_RGB_MATRIX_DIGITAL_RAIN | 45 | # define DISABLE_RGB_MATRIX_DIGITAL_RAIN |
| 55 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE | 46 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE |
| 56 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE | 47 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE |
| 57 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | 48 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE |
| 58 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | 49 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE |
| 59 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | 50 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS |
| 60 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | 51 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS |
| 61 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | 52 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS |
| 62 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | 53 | # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS |
| 63 | # define DISABLE_RGB_MATRIX_SPLASH | 54 | # define DISABLE_RGB_MATRIX_SPLASH |
| 64 | # define DISABLE_RGB_MATRIX_MULTISPLASH | 55 | # define DISABLE_RGB_MATRIX_MULTISPLASH |
| 65 | # define DISABLE_RGB_MATRIX_SOLID_SPLASH | 56 | # define DISABLE_RGB_MATRIX_SOLID_SPLASH |
| 66 | # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH | 57 | # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH |
| 67 | # endif // AVR | 58 | #endif // RGB_MATRIX_ENABLE |
| 68 | #endif // RGB_MATRIX_ENABLE | 59 | |
| 69 | 60 | #if !defined(ONESHOT_TAP_TOGGLE) | |
| 70 | #ifndef ONESHOT_TAP_TOGGLE | ||
| 71 | # define ONESHOT_TAP_TOGGLE 2 | 61 | # define ONESHOT_TAP_TOGGLE 2 |
| 72 | #endif // !ONESHOT_TAP_TOGGLE | 62 | #endif // !ONESHOT_TAP_TOGGLE |
| 73 | 63 | ||
| 74 | #ifndef ONESHOT_TIMEOUT | 64 | #if !defined(ONESHOT_TIMEOUT) |
| 75 | # define ONESHOT_TIMEOUT 3000 | 65 | # define ONESHOT_TIMEOUT 3000 |
| 76 | #endif // !ONESHOT_TIMEOUT | 66 | #endif // !ONESHOT_TIMEOUT |
| 77 | 67 | ||
| 78 | #ifndef QMK_KEYS_PER_SCAN | 68 | #if !defined(QMK_KEYS_PER_SCAN) |
| 79 | # define QMK_KEYS_PER_SCAN 4 | 69 | # define QMK_KEYS_PER_SCAN 4 |
| 80 | #endif // !QMK_KEYS_PER_SCAN | 70 | #endif // !QMK_KEYS_PER_SCAN |
| 81 | 71 | ||
| 82 | // this makes it possible to do rolling combos (zx) with keys that | ||
| 83 | // convert to other keys on hold (z becomes ctrl when you hold it, | ||
| 84 | // and when this option isn't enabled, z rapidly followed by x | ||
| 85 | // actually sends Ctrl-x. That's bad.) | ||
| 86 | #define IGNORE_MOD_TAP_INTERRUPT | 72 | #define IGNORE_MOD_TAP_INTERRUPT |
| 87 | #undef PERMISSIVE_HOLD | 73 | #undef PERMISSIVE_HOLD |
| 88 | //#define TAPPING_FORCE_HOLD | ||
| 89 | //#define RETRO_TAPPING | ||
| 90 | 74 | ||
| 91 | #define FORCE_NKRO | 75 | #define FORCE_NKRO |
| 92 | 76 | ||
| 93 | #ifndef TAPPING_TOGGLE | 77 | #if !defined(TAPPING_TOGGLE) |
| 94 | # define TAPPING_TOGGLE 1 | 78 | # define TAPPING_TOGGLE 1 |
| 95 | #endif | 79 | #endif |
| 96 | 80 | ||
| 97 | #ifdef TAPPING_TERM | 81 | #if defined(TAPPING_TERM) |
| 98 | # undef TAPPING_TERM | 82 | # undef TAPPING_TERM |
| 99 | #endif // TAPPING_TERM | 83 | #endif // TAPPING_TERM |
| 84 | |||
| 100 | #if defined(KEYBOARD_ergodox_ez) | 85 | #if defined(KEYBOARD_ergodox_ez) |
| 101 | # define TAPPING_TERM 185 | 86 | # define TAPPING_TERM 185 |
| 102 | #elif defined(KEYBOARD_crkbd) | 87 | #elif defined(KEYBOARD_crkbd) |
| @@ -107,12 +92,20 @@ | |||
| 107 | 92 | ||
| 108 | #define TAP_CODE_DELAY 5 | 93 | #define TAP_CODE_DELAY 5 |
| 109 | 94 | ||
| 95 | #define LEADER_TIMEOUT 250 | ||
| 96 | #define LEADER_PER_KEY_TIMING | ||
| 97 | |||
| 110 | /* Disable unused and unneeded features to reduce on firmware size */ | 98 | /* Disable unused and unneeded features to reduce on firmware size */ |
| 111 | #ifdef LOCKING_SUPPORT_ENABLE | 99 | #if defined(LOCKING_SUPPORT_ENABLE) |
| 112 | # undef LOCKING_SUPPORT_ENABLE | 100 | # undef LOCKING_SUPPORT_ENABLE |
| 113 | #endif | 101 | #endif |
| 114 | #ifdef LOCKING_RESYNC_ENABLE | 102 | |
| 103 | #if defined(LOCKING_RESYNC_ENABLE) | ||
| 115 | # undef LOCKING_RESYNC_ENABLE | 104 | # undef LOCKING_RESYNC_ENABLE |
| 116 | #endif | 105 | #endif |
| 117 | 106 | ||
| 107 | #if defined(OLED_FONT_H) | ||
| 108 | # undef OLED_FONT_H | ||
| 109 | #endif | ||
| 110 | |||
| 118 | #define OLED_FONT_H "users/curry/glcdfont.c" | 111 | #define OLED_FONT_H "users/curry/glcdfont.c" |
diff --git a/users/curry/curry.c b/users/curry/curry.c index b6afa5ef2..035355359 100644 --- a/users/curry/curry.c +++ b/users/curry/curry.c | |||
| @@ -53,15 +53,16 @@ void rgb_matrix_update_pwm_buffers(void); | |||
| 53 | 53 | ||
| 54 | // On RESET, set all RGB to red, shutdown the keymap. | 54 | // On RESET, set all RGB to red, shutdown the keymap. |
| 55 | void shutdown_user(void) { | 55 | void shutdown_user(void) { |
| 56 | #ifdef RGBLIGHT_ENABLE | 56 | #if defined(RGBLIGHT_ENABLE) |
| 57 | rgblight_enable_noeeprom(); | 57 | rgblight_enable_noeeprom(); |
| 58 | rgblight_mode_noeeprom(1); | 58 | rgblight_mode_noeeprom(1); |
| 59 | rgblight_setrgb_red(); | 59 | rgblight_setrgb_red(); |
| 60 | #endif // RGBLIGHT_ENABLE | 60 | #endif |
| 61 | #ifdef RGB_MATRIX_ENABLE | 61 | |
| 62 | #if defined(RGB_MATRIX_ENABLE) | ||
| 62 | rgb_matrix_set_color_all(0xFF, 0x00, 0x00); | 63 | rgb_matrix_set_color_all(0xFF, 0x00, 0x00); |
| 63 | rgb_matrix_update_pwm_buffers(); | 64 | rgb_matrix_update_pwm_buffers(); |
| 64 | #endif // RGB_MATRIX_ENABLE | 65 | #endif |
| 65 | shutdown_keymap(); | 66 | shutdown_keymap(); |
| 66 | } | 67 | } |
| 67 | 68 | ||
| @@ -77,7 +78,7 @@ __attribute__((weak)) void matrix_scan_keymap(void) {} | |||
| 77 | 78 | ||
| 78 | // No global matrix scan code, so just run keymap's matrix | 79 | // No global matrix scan code, so just run keymap's matrix |
| 79 | // scan function | 80 | // scan function |
| 80 | void matrix_scan_user(void) { | 81 | __attribute__((weak)) void matrix_scan_user(void) { |
| 81 | static bool has_ran_yet; | 82 | static bool has_ran_yet; |
| 82 | if (!has_ran_yet) { | 83 | if (!has_ran_yet) { |
| 83 | has_ran_yet = true; | 84 | has_ran_yet = true; |
| @@ -96,18 +97,16 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) | |||
| 96 | // On Layer change, run keymap's layer change check | 97 | // On Layer change, run keymap's layer change check |
| 97 | layer_state_t layer_state_set_user(layer_state_t state) { | 98 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 98 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); | 99 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); |
| 99 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | 100 | #if defined(RGBLIGHT_ENABLE) |
| 100 | state = layer_state_set_rgb(state); | 101 | state = layer_state_set_rgb(state); |
| 101 | #endif // RGBLIGHT_ENABLE | 102 | #endif |
| 102 | return layer_state_set_keymap(state); | 103 | return layer_state_set_keymap(state); |
| 103 | } | 104 | } |
| 104 | 105 | ||
| 105 | __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } | 106 | __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } |
| 106 | 107 | ||
| 107 | // Runs state check and changes underglow color and animation | 108 | // Runs state check and changes underglow color and animation |
| 108 | layer_state_t default_layer_state_set_user(layer_state_t state) { | 109 | layer_state_t default_layer_state_set_user(layer_state_t state) { return default_layer_state_set_keymap(state); } |
| 109 | return default_layer_state_set_keymap(state); | ||
| 110 | } | ||
| 111 | 110 | ||
| 112 | __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} | 111 | __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} |
| 113 | 112 | ||
diff --git a/users/curry/curry.h b/users/curry/curry.h index a9de9ae51..ee4a73683 100644 --- a/users/curry/curry.h +++ b/users/curry/curry.h | |||
| @@ -1,18 +1,23 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #include QMK_KEYBOARD_H | 3 | #include QMK_KEYBOARD_H |
| 4 | |||
| 5 | #include "version.h" | 4 | #include "version.h" |
| 6 | #include "eeprom.h" | 5 | #include "eeprom.h" |
| 7 | #include "wrappers.h" | 6 | #include "wrappers.h" |
| 8 | #include "process_records.h" | 7 | #include "process_records.h" |
| 9 | 8 | ||
| 10 | #ifdef TAP_DANCE_ENABLE | 9 | #if defined(TAP_DANCE_ENABLE) |
| 11 | # include "tap_dances.h" | 10 | # include "tap_dances.h" |
| 12 | #endif // TAP_DANCE_ENABLE | 11 | #endif // TAP_DANCE_ENABLE |
| 13 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | 12 | |
| 14 | # include "rgb_stuff.h" | 13 | #if defined(RGB_MATRIX_ENABLE) |
| 14 | # include "rgb_matrix_user.h" | ||
| 15 | #endif | 15 | #endif |
| 16 | |||
| 17 | #if defined(RGBLIGHT_ENABLE) | ||
| 18 | # include "rgb_lighting_user.h" | ||
| 19 | #endif | ||
| 20 | |||
| 16 | #if defined(KEYBOARD_lily58_rev1) & defined(PROTOCOL_LUFA) | 21 | #if defined(KEYBOARD_lily58_rev1) & defined(PROTOCOL_LUFA) |
| 17 | # include "lufa.h" | 22 | # include "lufa.h" |
| 18 | # include "split_util.h" | 23 | # include "split_util.h" |
| @@ -23,6 +28,7 @@ enum userspace_layers { | |||
| 23 | _QWERTY = 0, | 28 | _QWERTY = 0, |
| 24 | _COLEMAK, | 29 | _COLEMAK, |
| 25 | _DVORAK, | 30 | _DVORAK, |
| 31 | _WORKMAN, | ||
| 26 | _MODS, | 32 | _MODS, |
| 27 | _LOWER, | 33 | _LOWER, |
| 28 | _RAISE, | 34 | _RAISE, |
diff --git a/users/curry/glcdfont.c b/users/curry/glcdfont.c index 2bfc3fac6..10ce3b345 100644 --- a/users/curry/glcdfont.c +++ b/users/curry/glcdfont.c | |||
| @@ -1,13 +1,4 @@ | |||
| 1 | #pragma once | 1 | #include "progmem.h" |
| 2 | |||
| 3 | #ifdef __AVR__ | ||
| 4 | # include <avr/io.h> | ||
| 5 | # include <avr/pgmspace.h> | ||
| 6 | #elif defined(ESP8266) | ||
| 7 | # include <pgmspace.h> | ||
| 8 | #else | ||
| 9 | # define PROGMEM | ||
| 10 | #endif | ||
| 11 | 2 | ||
| 12 | // Corne 8x6 font with QMK Firmware Logo | 3 | // Corne 8x6 font with QMK Firmware Logo |
| 13 | // Online editor: https://helixfonteditor.netlify.com/ | 4 | // Online editor: https://helixfonteditor.netlify.com/ |
diff --git a/users/curry/leader.c b/users/curry/leader.c new file mode 100644 index 000000000..3fca6a2ec --- /dev/null +++ b/users/curry/leader.c | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | #include "curry.h" | ||
| 2 | #include "leader.h" | ||
| 3 | |||
| 4 | LEADER_EXTERNS(); | ||
| 5 | |||
| 6 | void matrix_scan_user(void) { | ||
| 7 | static bool has_ran_yet; | ||
| 8 | if (!has_ran_yet) { | ||
| 9 | has_ran_yet = true; | ||
| 10 | startup_user(); | ||
| 11 | } | ||
| 12 | |||
| 13 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | ||
| 14 | matrix_scan_rgb(); | ||
| 15 | #endif // RGBLIGHT_ENABLE | ||
| 16 | LEADER_DICTIONARY() { | ||
| 17 | leading = false; | ||
| 18 | leader_end(); | ||
| 19 | SEQ_ONE_KEY(KC_F) { SEND_STRING(SS_LCTL("akf")); } // Select all and format | ||
| 20 | SEQ_ONE_KEY(KC_P) { SEND_STRING(SS_LCTL(SS_LSFT("4"))); } // Screenshot region | ||
| 21 | SEQ_TWO_KEYS(KC_D, KC_D) { SEND_STRING(SS_LCTL("ac")); } // Copy all | ||
| 22 | } | ||
| 23 | matrix_scan_keymap(); | ||
| 24 | } | ||
diff --git a/users/curry/leader.h b/users/curry/leader.h new file mode 100644 index 000000000..f215893b9 --- /dev/null +++ b/users/curry/leader.h | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | void matrix_scan_user(void); | ||
diff --git a/users/curry/oled.c b/users/curry/oled.c index 4eb23423e..fc87a46e5 100644 --- a/users/curry/oled.c +++ b/users/curry/oled.c | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | #include "curry.h" | 1 | #include "curry.h" |
| 2 | 2 | ||
| 3 | #ifdef OLED_DRIVER_ENABLE | ||
| 4 | #define KEYLOGGER_LENGTH 5 | 3 | #define KEYLOGGER_LENGTH 5 |
| 5 | static uint32_t oled_timer = 0; | 4 | static uint32_t oled_timer = 0; |
| 6 | static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; | 5 | static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; |
| @@ -26,6 +25,7 @@ static const char PROGMEM code_to_name[0xFF] = { | |||
| 26 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx | 25 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx |
| 27 | }; | 26 | }; |
| 28 | 27 | ||
| 28 | // clang-format on | ||
| 29 | void add_keylog(uint16_t keycode); | 29 | void add_keylog(uint16_t keycode); |
| 30 | 30 | ||
| 31 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } | 31 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } |
| @@ -49,7 +49,7 @@ void add_keylog(uint16_t keycode) { | |||
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | void render_keylogger_status(void) { | 51 | void render_keylogger_status(void) { |
| 52 | oled_write_P(PSTR("Keys"), false); | 52 | oled_write_P(PSTR("Keys:"), false); |
| 53 | oled_write(keylog_str, false); | 53 | oled_write(keylog_str, false); |
| 54 | } | 54 | } |
| 55 | 55 | ||
| @@ -65,6 +65,9 @@ void render_default_layer_state(void) { | |||
| 65 | case _DVORAK: | 65 | case _DVORAK: |
| 66 | oled_write_P(PSTR(" DVRK"), false); | 66 | oled_write_P(PSTR(" DVRK"), false); |
| 67 | break; | 67 | break; |
| 68 | case _WORKMAN: | ||
| 69 | oled_write_P(PSTR(" WRKM"), false); | ||
| 70 | break; | ||
| 68 | } | 71 | } |
| 69 | } | 72 | } |
| 70 | 73 | ||
| @@ -139,11 +142,11 @@ void oled_task_user(void) { | |||
| 139 | oled_off(); | 142 | oled_off(); |
| 140 | return; | 143 | return; |
| 141 | } | 144 | } |
| 142 | # ifndef SPLIT_KEYBOARD | 145 | #if !defined(SPLIT_KEYBOARD) |
| 143 | else { | 146 | else { |
| 144 | oled_on(); | 147 | oled_on(); |
| 145 | } | 148 | } |
| 146 | # endif | 149 | #endif |
| 147 | if (is_keyboard_master()) { | 150 | if (is_keyboard_master()) { |
| 148 | render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) | 151 | render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) |
| 149 | } else { | 152 | } else { |
| @@ -158,5 +161,3 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
| 158 | } | 161 | } |
| 159 | return true; | 162 | return true; |
| 160 | } | 163 | } |
| 161 | |||
| 162 | #endif | ||
diff --git a/users/curry/process_records.c b/users/curry/process_records.c index fd1d61ad9..fd58ea181 100644 --- a/users/curry/process_records.c +++ b/users/curry/process_records.c | |||
| @@ -9,6 +9,11 @@ __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t | |||
| 9 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 9 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 10 | xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); | 10 | xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); |
| 11 | switch (keycode) { | 11 | switch (keycode) { |
| 12 | case KC_QWERTY ... KC_WORKMAN: | ||
| 13 | if (record->event.pressed) { | ||
| 14 | set_single_persistent_default_layer(keycode - KC_QWERTY); | ||
| 15 | } | ||
| 16 | break; | ||
| 12 | case KC_MAKE: | 17 | case KC_MAKE: |
| 13 | if (!record->event.pressed) { | 18 | if (!record->event.pressed) { |
| 14 | uint8_t temp_mod = mod_config(get_mods()); | 19 | uint8_t temp_mod = mod_config(get_mods()); |
| @@ -19,18 +24,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 19 | if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) { | 24 | if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) { |
| 20 | send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); | 25 | send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); |
| 21 | } | 26 | } |
| 22 | if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { | 27 | send_string_with_delay_P(PSTR(" -j8 --output-sync\n"), TAP_CODE_DELAY); |
| 23 | send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); | ||
| 24 | } | ||
| 25 | #ifdef RGB_MATRIX_SPLIT_RIGHT | ||
| 26 | send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); | ||
| 27 | # ifndef OLED_DRIVER_ENABLE | ||
| 28 | send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); | ||
| 29 | # endif | ||
| 30 | #endif | ||
| 31 | send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); | ||
| 32 | } | 28 | } |
| 33 | |||
| 34 | break; | 29 | break; |
| 35 | 30 | ||
| 36 | case VRSN: // Prints firmware version | 31 | case VRSN: // Prints firmware version |
| @@ -44,17 +39,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 44 | copy_paste_timer = timer_read(); | 39 | copy_paste_timer = timer_read(); |
| 45 | } else { | 40 | } else { |
| 46 | if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy | 41 | if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy |
| 47 | register_code(KC_LCTL); | 42 | tap_code16(LCTL(KC_C)); |
| 48 | tap_code(KC_C); | ||
| 49 | unregister_code(KC_LCTL); | ||
| 50 | } else { // Tap, paste | 43 | } else { // Tap, paste |
| 51 | register_code(KC_LCTL); | 44 | tap_code16(LCTL(KC_V)); |
| 52 | tap_code(KC_V); | ||
| 53 | unregister_code(KC_LCTL); | ||
| 54 | } | 45 | } |
| 55 | } | 46 | } |
| 56 | break; | 47 | break; |
| 57 | #ifdef UNICODE_ENABLE | 48 | #if defined(UNICODE_ENABLE) |
| 58 | case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ | 49 | case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ |
| 59 | if (record->event.pressed) { | 50 | if (record->event.pressed) { |
| 60 | send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); | 51 | send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); |
diff --git a/users/curry/process_records.h b/users/curry/process_records.h index 6170ed4c7..49e7240c6 100644 --- a/users/curry/process_records.h +++ b/users/curry/process_records.h | |||
| @@ -1,36 +1,29 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | #include "curry.h" | ||
| 3 | |||
| 4 | #if defined(KEYMAP_SAFE_RANGE) | ||
| 5 | # define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE | ||
| 6 | #else | ||
| 7 | # define PLACEHOLDER_SAFE_RANGE SAFE_RANGE | ||
| 8 | #endif | ||
| 9 | 2 | ||
| 10 | enum userspace_custom_keycodes { | 3 | enum userspace_custom_keycodes { |
| 11 | VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info | 4 | VRSN = SAFE_RANGE, // Prints QMK Firmware and board info |
| 12 | KC_QWERTY, // Sets default layer to QWERTY | 5 | KC_QWERTY, // Sets default layer to QWERTY |
| 13 | KC_COLEMAK, // Sets default layer to COLEMAK | 6 | KC_COLEMAK, // Sets default layer to COLEMAK |
| 14 | KC_DVORAK, // Sets default layer to DVORAK | 7 | KC_DVORAK, // Sets default layer to DVORAK |
| 15 | KC_MAKE, // Run keyboard's customized make command | 8 | KC_WORKMAN, // Sets default layer to WORKMAN |
| 16 | KC_RGB_T, // Toggles RGB Layer Indication mode | 9 | KC_MAKE, // Run keyboard's customized make command |
| 17 | RGB_IDL, // RGB Idling animations | 10 | KC_RGB_T, // Toggles RGB Layer Indication mode |
| 18 | KC_SECRET_1, // test1 | 11 | RGB_IDL, // RGB Idling animations |
| 19 | KC_SECRET_2, // test2 | 12 | KC_SECRET_1, // test1 |
| 20 | KC_SECRET_3, // test3 | 13 | KC_SECRET_2, // test2 |
| 21 | KC_SECRET_4, // test4 | 14 | KC_SECRET_3, // test3 |
| 22 | KC_SECRET_5, // test5 | 15 | KC_SECRET_4, // test4 |
| 23 | KC_CCCV, // Hold to copy, tap to paste | 16 | KC_SECRET_5, // test5 |
| 24 | KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! | 17 | KC_CCCV, // Hold to copy, tap to paste |
| 25 | UC_FLIP, // (ಠ痊ಠ)┻━┻ | 18 | UC_FLIP, // (ಠ痊ಠ)┻━┻ |
| 26 | UC_TABL, // ┬─┬ノ( º _ ºノ) | 19 | UC_TABL, // ┬─┬ノ( º _ ºノ) |
| 27 | UC_SHRG, // ¯\_(ツ)_/¯ | 20 | UC_SHRG, // ¯\_(ツ)_/¯ |
| 28 | UC_DISA, // ಠ_ಠ | 21 | UC_DISA, // ಠ_ಠ |
| 29 | KC_DT1, | 22 | KC_DT1, |
| 30 | KC_DT2, | 23 | KC_DT2, |
| 31 | KC_DT3, | 24 | KC_DT3, |
| 32 | KC_DT4, | 25 | KC_DT4, |
| 33 | NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes | 26 | NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes |
| 34 | }; | 27 | }; |
| 35 | 28 | ||
| 36 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record); | 29 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record); |
| @@ -52,25 +45,20 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); | |||
| 52 | #define QWERTY KC_QWERTY | 45 | #define QWERTY KC_QWERTY |
| 53 | #define DVORAK KC_DVORAK | 46 | #define DVORAK KC_DVORAK |
| 54 | #define COLEMAK KC_COLEMAK | 47 | #define COLEMAK KC_COLEMAK |
| 48 | #define WORKMAN KC_WORKMAN | ||
| 55 | 49 | ||
| 56 | #define KC_RESET RESET | 50 | #define KC_RST RESET |
| 57 | #define KC_RST KC_RESET | ||
| 58 | 51 | ||
| 59 | #ifdef SWAP_HANDS_ENABLE | 52 | #if defined(SWAP_HANDS_ENABLE) |
| 60 | # define KC_C1R3 SH_T(KC_TAB) | 53 | # define KC_C1R3 SH_T(KC_TAB) |
| 61 | #else // SWAP_HANDS_ENABLE | 54 | #else // SWAP_HANDS_ENABLE |
| 62 | # define KC_C1R3 KC_TAB | 55 | # define KC_C1R3 KC_TAB |
| 63 | #endif // SWAP_HANDS_ENABLE | 56 | #endif // SWAP_HANDS_ENABLE |
| 64 | 57 | ||
| 65 | #define BK_LWER LT(_LOWER, KC_BSPC) | ||
| 66 | #define SP_LWER LT(_LOWER, KC_SPC) | 58 | #define SP_LWER LT(_LOWER, KC_SPC) |
| 67 | #define DL_RAIS LT(_RAISE, KC_DEL) | ||
| 68 | #define ET_RAIS LT(_RAISE, KC_ENTER) | 59 | #define ET_RAIS LT(_RAISE, KC_ENTER) |
| 69 | 60 | ||
| 70 | /* OSM keycodes, to keep things clean and easy to change */ | 61 | /* OSM keycodes, to keep things clean and easy to change */ |
| 71 | #define KC_MLSF OSM(MOD_LSFT) | ||
| 72 | #define KC_MRSF OSM(MOD_RSFT) | ||
| 73 | |||
| 74 | #define OS_LGUI OSM(MOD_LGUI) | 62 | #define OS_LGUI OSM(MOD_LGUI) |
| 75 | #define OS_RGUI OSM(MOD_RGUI) | 63 | #define OS_RGUI OSM(MOD_RGUI) |
| 76 | #define OS_LSFT OSM(MOD_LSFT) | 64 | #define OS_LSFT OSM(MOD_LSFT) |
| @@ -82,12 +70,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); | |||
| 82 | #define OS_MEH OSM(MOD_MEH) | 70 | #define OS_MEH OSM(MOD_MEH) |
| 83 | #define OS_HYPR OSM(MOD_HYPR) | 71 | #define OS_HYPR OSM(MOD_HYPR) |
| 84 | 72 | ||
| 85 | #define M_LALT ALT_T(KC_TAB) | ||
| 86 | #define M_RALT RALT_T(KC_QUOT) | ||
| 87 | |||
| 88 | #define M_LCTL CTL_T(KC_TAB) | ||
| 89 | #define M_RCTL RCTL_T(KC_QUOT) | ||
| 90 | |||
| 91 | #define MT_ESC MT(MOD_LCTL, KC_ESC) | 73 | #define MT_ESC MT(MOD_LCTL, KC_ESC) |
| 92 | 74 | ||
| 93 | #define ALT_APP ALT_T(KC_APP) | 75 | #define ALT_APP ALT_T(KC_APP) |
diff --git a/users/curry/rgb_stuff.c b/users/curry/rgb_lighting_user.c index 1129f70be..25e1ce010 100644 --- a/users/curry/rgb_stuff.c +++ b/users/curry/rgb_lighting_user.c | |||
| @@ -1,138 +1,77 @@ | |||
| 1 | #include "curry.h" | 1 | #include "curry.h" |
| 2 | #include "rgb_stuff.h" | 2 | #include "rgb_lighting_user.h" |
| 3 | #include "eeprom.h" | ||
| 4 | 3 | ||
| 5 | #if defined(RGBLIGHT_ENABLE) | ||
| 6 | extern rgblight_config_t rgblight_config; | 4 | extern rgblight_config_t rgblight_config; |
| 7 | bool has_initialized; | 5 | bool has_initialized; |
| 8 | 6 | ||
| 9 | void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); } | 7 | void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); } |
| 10 | #endif // RGBLIGHT_ENABLE | ||
| 11 | |||
| 12 | #if defined(RGB_MATRIX_ENABLE) | ||
| 13 | static uint32_t hypno_timer; | ||
| 14 | # if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) | ||
| 15 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
| 16 | # else | ||
| 17 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN | ||
| 18 | # endif | ||
| 19 | |||
| 20 | void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } | ||
| 21 | |||
| 22 | void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } | ||
| 23 | |||
| 24 | void check_default_layer(uint8_t mode, uint8_t type) { | ||
| 25 | switch (get_highest_layer(default_layer_state)) { | ||
| 26 | case _QWERTY: | ||
| 27 | rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); | ||
| 28 | break; | ||
| 29 | case _COLEMAK: | ||
| 30 | rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type); | ||
| 31 | break; | ||
| 32 | case _DVORAK: | ||
| 33 | rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type); | ||
| 34 | break; | ||
| 35 | } | ||
| 36 | } | ||
| 37 | |||
| 38 | void rgb_matrix_indicators_user(void) { | ||
| 39 | if (userspace_config.rgb_layer_change && | ||
| 40 | # ifdef RGB_DISABLE_WHEN_USB_SUSPENDED | ||
| 41 | !g_suspend_state && | ||
| 42 | # endif | ||
| 43 | # if defined(RGBLIGHT_ENABLE) | ||
| 44 | (!rgblight_config.enable && rgb_matrix_config.enable) | ||
| 45 | # else | ||
| 46 | rgb_matrix_config.enable | ||
| 47 | # endif | ||
| 48 | ) { | ||
| 49 | switch (get_highest_layer(layer_state)) { | ||
| 50 | case _RAISE: | ||
| 51 | rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 52 | break; | ||
| 53 | case _LOWER: | ||
| 54 | rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 55 | break; | ||
| 56 | case _ADJUST: | ||
| 57 | rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 58 | break; | ||
| 59 | default: { | ||
| 60 | check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW); | ||
| 61 | break; | ||
| 62 | } | ||
| 63 | } | ||
| 64 | check_default_layer(0, LED_FLAG_MODIFIER); | ||
| 65 | } | ||
| 66 | } | ||
| 67 | #endif | ||
| 68 | 8 | ||
| 69 | /* Custom indicators for modifiers. | 9 | /* Custom indicators for modifiers. |
| 70 | * This allows for certain lights to be lit up, based on what mods are active, giving some visual feedback. | 10 | * This allows for certain lights to be lit up, based on what mods are active, giving some visual feedback. |
| 71 | * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. | 11 | * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. |
| 72 | */ | 12 | */ |
| 73 | #ifdef RGBLIGHT_ENABLE | 13 | #if defined(INDICATOR_LIGHTS) |
| 74 | # ifdef INDICATOR_LIGHTS | ||
| 75 | void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { | 14 | void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { |
| 76 | if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) { | 15 | if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) { |
| 77 | if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { | 16 | if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { |
| 78 | # ifdef SHFT_LED1 | 17 | # ifdef SHFT_LED1 |
| 79 | rgblight_sethsv_at(120, 255, 255, SHFT_LED1); | 18 | rgblight_sethsv_at(120, 255, 255, SHFT_LED1); |
| 80 | # endif // SHFT_LED1 | 19 | # endif // SHFT_LED1 |
| 81 | # ifdef SHFT_LED2 | 20 | # ifdef SHFT_LED2 |
| 82 | rgblight_sethsv_at(120, 255, 255, SHFT_LED2); | 21 | rgblight_sethsv_at(120, 255, 255, SHFT_LED2); |
| 83 | # endif // SHFT_LED2 | 22 | # endif // SHFT_LED2 |
| 84 | } else { | 23 | } else { |
| 85 | # ifdef SHFT_LED1 | 24 | # ifdef SHFT_LED1 |
| 86 | rgblight_sethsv_default_helper(SHFT_LED1); | 25 | rgblight_sethsv_default_helper(SHFT_LED1); |
| 87 | # endif // SHFT_LED1 | 26 | # endif // SHFT_LED1 |
| 88 | # ifdef SHFT_LED2 | 27 | # ifdef SHFT_LED2 |
| 89 | rgblight_sethsv_default_helper(SHFT_LED2); | 28 | rgblight_sethsv_default_helper(SHFT_LED2); |
| 90 | # endif // SHFT_LED2 | 29 | # endif // SHFT_LED2 |
| 91 | } | 30 | } |
| 92 | if ((this_mod | this_osm) & MOD_MASK_CTRL) { | 31 | if ((this_mod | this_osm) & MOD_MASK_CTRL) { |
| 93 | # ifdef CTRL_LED1 | 32 | # ifdef CTRL_LED1 |
| 94 | rgblight_sethsv_at(0, 255, 255, CTRL_LED1); | 33 | rgblight_sethsv_at(0, 255, 255, CTRL_LED1); |
| 95 | # endif // CTRL_LED1 | 34 | # endif // CTRL_LED1 |
| 96 | # ifdef CTRL_LED2 | 35 | # ifdef CTRL_LED2 |
| 97 | rgblight_sethsv_at(0, 255, 255, CTRL_LED2); | 36 | rgblight_sethsv_at(0, 255, 255, CTRL_LED2); |
| 98 | # endif // CTRL_LED2 | 37 | # endif // CTRL_LED2 |
| 99 | } else { | 38 | } else { |
| 100 | # ifdef CTRL_LED1 | 39 | # ifdef CTRL_LED1 |
| 101 | rgblight_sethsv_default_helper(CTRL_LED1); | 40 | rgblight_sethsv_default_helper(CTRL_LED1); |
| 102 | # endif // CTRL_LED1 | 41 | # endif // CTRL_LED1 |
| 103 | # ifdef CTRL_LED2 | 42 | # ifdef CTRL_LED2 |
| 104 | rgblight_sethsv_default_helper(CTRL_LED2); | 43 | rgblight_sethsv_default_helper(CTRL_LED2); |
| 105 | # endif // CTRL_LED2 | 44 | # endif // CTRL_LED2 |
| 106 | } | 45 | } |
| 107 | if ((this_mod | this_osm) & MOD_MASK_GUI) { | 46 | if ((this_mod | this_osm) & MOD_MASK_GUI) { |
| 108 | # ifdef GUI_LED1 | 47 | # ifdef GUI_LED1 |
| 109 | rgblight_sethsv_at(51, 255, 255, GUI_LED1); | 48 | rgblight_sethsv_at(51, 255, 255, GUI_LED1); |
| 110 | # endif // GUI_LED1 | 49 | # endif // GUI_LED1 |
| 111 | # ifdef GUI_LED2 | 50 | # ifdef GUI_LED2 |
| 112 | rgblight_sethsv_at(51, 255, 255, GUI_LED2); | 51 | rgblight_sethsv_at(51, 255, 255, GUI_LED2); |
| 113 | # endif // GUI_LED2 | 52 | # endif // GUI_LED2 |
| 114 | } else { | 53 | } else { |
| 115 | # ifdef GUI_LED1 | 54 | # ifdef GUI_LED1 |
| 116 | rgblight_sethsv_default_helper(GUI_LED1); | 55 | rgblight_sethsv_default_helper(GUI_LED1); |
| 117 | # endif // GUI_LED1 | 56 | # endif // GUI_LED1 |
| 118 | # ifdef GUI_LED2 | 57 | # ifdef GUI_LED2 |
| 119 | rgblight_sethsv_default_helper(GUI_LED2); | 58 | rgblight_sethsv_default_helper(GUI_LED2); |
| 120 | # endif // GUI_LED2 | 59 | # endif // GUI_LED2 |
| 121 | } | 60 | } |
| 122 | if ((this_mod | this_osm) & MOD_MASK_ALT) { | 61 | if ((this_mod | this_osm) & MOD_MASK_ALT) { |
| 123 | # ifdef ALT_LED1 | 62 | # ifdef ALT_LED1 |
| 124 | rgblight_sethsv_at(240, 255, 255, ALT_LED1); | 63 | rgblight_sethsv_at(240, 255, 255, ALT_LED1); |
| 125 | # endif // ALT_LED1 | 64 | # endif // ALT_LED1 |
| 126 | # ifdef GUI_LED2 | 65 | # ifdef GUI_LED2 |
| 127 | rgblight_sethsv_at(240, 255, 255, ALT_LED2); | 66 | rgblight_sethsv_at(240, 255, 255, ALT_LED2); |
| 128 | # endif // GUI_LED2 | 67 | # endif // GUI_LED2 |
| 129 | } else { | 68 | } else { |
| 130 | # ifdef GUI_LED1 | 69 | # ifdef GUI_LED1 |
| 131 | rgblight_sethsv_default_helper(ALT_LED1); | 70 | rgblight_sethsv_default_helper(ALT_LED1); |
| 132 | # endif // GUI_LED1 | 71 | # endif // GUI_LED1 |
| 133 | # ifdef GUI_LED2 | 72 | # ifdef GUI_LED2 |
| 134 | rgblight_sethsv_default_helper(ALT_LED2); | 73 | rgblight_sethsv_default_helper(ALT_LED2); |
| 135 | # endif // GUI_LED2 | 74 | # endif // GUI_LED2 |
| 136 | } | 75 | } |
| 137 | } | 76 | } |
| 138 | } | 77 | } |
| @@ -143,9 +82,9 @@ void matrix_scan_indicator(void) { | |||
| 143 | set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); | 82 | set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); |
| 144 | } | 83 | } |
| 145 | } | 84 | } |
| 146 | # endif // INDICATOR_LIGHTS | 85 | #endif // INDICATOR_LIGHTS |
| 147 | 86 | ||
| 148 | # ifdef RGBLIGHT_TWINKLE | 87 | #if defined(RGBLIGHT_TWINKLE) |
| 149 | static rgblight_fadeout lights[RGBLED_NUM]; | 88 | static rgblight_fadeout lights[RGBLED_NUM]; |
| 150 | 89 | ||
| 151 | __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } | 90 | __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } |
| @@ -153,40 +92,40 @@ __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { | |||
| 153 | /* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ | 92 | /* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ |
| 154 | bool rgblight_twinkle_is_led_used(uint8_t index) { | 93 | bool rgblight_twinkle_is_led_used(uint8_t index) { |
| 155 | switch (index) { | 94 | switch (index) { |
| 156 | # ifdef INDICATOR_LIGHTS | 95 | # ifdef INDICATOR_LIGHTS |
| 157 | # ifdef SHFT_LED1 | 96 | # ifdef SHFT_LED1 |
| 158 | case SHFT_LED1: | 97 | case SHFT_LED1: |
| 159 | return true; | 98 | return true; |
| 160 | # endif // SHFT_LED1 | 99 | # endif // SHFT_LED1 |
| 161 | # ifdef SHFT_LED2 | 100 | # ifdef SHFT_LED2 |
| 162 | case SHFT_LED2: | 101 | case SHFT_LED2: |
| 163 | return true; | 102 | return true; |
| 164 | # endif // SHFT_LED2 | 103 | # endif // SHFT_LED2 |
| 165 | # ifdef CTRL_LED1 | 104 | # ifdef CTRL_LED1 |
| 166 | case CTRL_LED1: | 105 | case CTRL_LED1: |
| 167 | return true; | 106 | return true; |
| 168 | # endif // CTRL_LED1 | 107 | # endif // CTRL_LED1 |
| 169 | # ifdef CTRL_LED2 | 108 | # ifdef CTRL_LED2 |
| 170 | case CTRL_LED2: | 109 | case CTRL_LED2: |
| 171 | return true; | 110 | return true; |
| 172 | # endif // CTRL_LED2 | 111 | # endif // CTRL_LED2 |
| 173 | # ifdef GUI_LED1 | 112 | # ifdef GUI_LED1 |
| 174 | case GUI_LED1: | 113 | case GUI_LED1: |
| 175 | return true; | 114 | return true; |
| 176 | # endif // GUI_LED1 | 115 | # endif // GUI_LED1 |
| 177 | # ifdef GUI_LED2 | 116 | # ifdef GUI_LED2 |
| 178 | case GUI_LED2: | 117 | case GUI_LED2: |
| 179 | return true; | 118 | return true; |
| 180 | # endif // GUI_LED2 | 119 | # endif // GUI_LED2 |
| 181 | # ifdef ALT_LED1 | 120 | # ifdef ALT_LED1 |
| 182 | case ALT_LED1: | 121 | case ALT_LED1: |
| 183 | return true; | 122 | return true; |
| 184 | # endif // ALT_LED1 | 123 | # endif // ALT_LED1 |
| 185 | # ifdef ALT_LED2 | 124 | # ifdef ALT_LED2 |
| 186 | case ALT_LED2: | 125 | case ALT_LED2: |
| 187 | return true; | 126 | return true; |
| 188 | # endif // ALT_LED2 | 127 | # endif // ALT_LED2 |
| 189 | # endif // INDICATOR_LIGHTS | 128 | # endif // INDICATOR_LIGHTS |
| 190 | default: | 129 | default: |
| 191 | return rgblight_twinkle_is_led_used_keymap(index); | 130 | return rgblight_twinkle_is_led_used_keymap(index); |
| 192 | } | 131 | } |
| @@ -259,8 +198,7 @@ void start_rgb_light(void) { | |||
| 259 | 198 | ||
| 260 | rgblight_sethsv_at(light->hue, 255, light->life, light_index); | 199 | rgblight_sethsv_at(light->hue, 255, light->life, light_index); |
| 261 | } | 200 | } |
| 262 | # endif | 201 | #endif |
| 263 | #endif // RGBLIGHT_ENABLE | ||
| 264 | 202 | ||
| 265 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | 203 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { |
| 266 | uint16_t temp_keycode = keycode; | 204 | uint16_t temp_keycode = keycode; |
| @@ -269,15 +207,8 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 269 | temp_keycode &= 0xFF; | 207 | temp_keycode &= 0xFF; |
| 270 | } | 208 | } |
| 271 | 209 | ||
| 272 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | ||
| 273 | hypno_timer = timer_read32(); | ||
| 274 | if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { | ||
| 275 | rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); | ||
| 276 | } | ||
| 277 | #endif | ||
| 278 | |||
| 279 | switch (temp_keycode) { | 210 | switch (temp_keycode) { |
| 280 | #ifdef RGBLIGHT_TWINKLE | 211 | #if defined(RGBLIGHT_TWINKLE) |
| 281 | case KC_A ... KC_SLASH: | 212 | case KC_A ... KC_SLASH: |
| 282 | case KC_F1 ... KC_F12: | 213 | case KC_F1 ... KC_F12: |
| 283 | case KC_INSERT ... KC_UP: | 214 | case KC_INSERT ... KC_UP: |
| @@ -290,7 +221,6 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 290 | break; | 221 | break; |
| 291 | #endif // RGBLIGHT_TWINKLE | 222 | #endif // RGBLIGHT_TWINKLE |
| 292 | case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal | 223 | case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal |
| 293 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | ||
| 294 | if (record->event.pressed) { | 224 | if (record->event.pressed) { |
| 295 | userspace_config.rgb_layer_change ^= 1; | 225 | userspace_config.rgb_layer_change ^= 1; |
| 296 | dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); | 226 | dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); |
| @@ -299,38 +229,16 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 299 | layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) | 229 | layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) |
| 300 | } | 230 | } |
| 301 | } | 231 | } |
| 302 | #endif // RGBLIGHT_ENABLE | ||
| 303 | break; | ||
| 304 | case RGB_IDL: // This allows me to use underglow as layer indication, or as normal | ||
| 305 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | ||
| 306 | if (record->event.pressed) { | ||
| 307 | userspace_config.rgb_matrix_idle_anim ^= 1; | ||
| 308 | dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); | ||
| 309 | eeconfig_update_user(userspace_config.raw); | ||
| 310 | if (userspace_config.rgb_matrix_idle_anim) { | ||
| 311 | rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); | ||
| 312 | } | ||
| 313 | } | ||
| 314 | #endif | ||
| 315 | break; | 232 | break; |
| 316 | case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions | 233 | case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions |
| 317 | if (record->event.pressed) { | 234 | if (record->event.pressed) { |
| 318 | bool is_eeprom_updated = false; | 235 | bool is_eeprom_updated = false; |
| 319 | #ifdef RGBLIGHT_ENABLE | ||
| 320 | // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled | 236 | // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled |
| 321 | if (userspace_config.rgb_layer_change) { | 237 | if (userspace_config.rgb_layer_change) { |
| 322 | userspace_config.rgb_layer_change = false; | 238 | userspace_config.rgb_layer_change = false; |
| 323 | dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); | 239 | dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); |
| 324 | is_eeprom_updated = true; | 240 | is_eeprom_updated = true; |
| 325 | } | 241 | } |
| 326 | #endif | ||
| 327 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | ||
| 328 | if (userspace_config.rgb_matrix_idle_anim) { | ||
| 329 | userspace_config.rgb_matrix_idle_anim = false; | ||
| 330 | dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); | ||
| 331 | is_eeprom_updated = true; | ||
| 332 | } | ||
| 333 | #endif | ||
| 334 | if (is_eeprom_updated) { | 242 | if (is_eeprom_updated) { |
| 335 | eeconfig_update_user(userspace_config.raw); | 243 | eeconfig_update_user(userspace_config.raw); |
| 336 | } | 244 | } |
| @@ -341,8 +249,7 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 341 | } | 249 | } |
| 342 | 250 | ||
| 343 | void keyboard_post_init_rgb(void) { | 251 | void keyboard_post_init_rgb(void) { |
| 344 | #if defined(RGBLIGHT_ENABLE) | 252 | #if defined(RGBLIGHT_STARTUP_ANIMATION) |
| 345 | # if defined(RGBLIGHT_STARTUP_ANIMATION) | ||
| 346 | bool is_enabled = rgblight_config.enable; | 253 | bool is_enabled = rgblight_config.enable; |
| 347 | if (userspace_config.rgb_layer_change) { | 254 | if (userspace_config.rgb_layer_change) { |
| 348 | rgblight_enable_noeeprom(); | 255 | rgblight_enable_noeeprom(); |
| @@ -361,44 +268,27 @@ void keyboard_post_init_rgb(void) { | |||
| 361 | rgblight_disable_noeeprom(); | 268 | rgblight_disable_noeeprom(); |
| 362 | } | 269 | } |
| 363 | 270 | ||
| 364 | # endif | ||
| 365 | layer_state_set_user(layer_state); | ||
| 366 | #endif | ||
| 367 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | ||
| 368 | if (userspace_config.rgb_matrix_idle_anim) { | ||
| 369 | rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); | ||
| 370 | } | ||
| 371 | #endif | 271 | #endif |
| 272 | layer_state_set_user(layer_state); | ||
| 372 | } | 273 | } |
| 373 | 274 | ||
| 374 | void matrix_scan_rgb(void) { | 275 | void matrix_scan_rgb(void) { |
| 375 | #ifdef RGBLIGHT_ENABLE | 276 | #if defined(RGBLIGHT_TWINKLE) |
| 376 | # ifdef RGBLIGHT_TWINKLE | ||
| 377 | scan_rgblight_fadeout(); | 277 | scan_rgblight_fadeout(); |
| 378 | # endif // RGBLIGHT_ENABLE | 278 | #endif // RGBLIGHT_ENABLE |
| 379 | 279 | ||
| 380 | # ifdef INDICATOR_LIGHTS | 280 | #if defined(INDICATOR_LIGHTS) |
| 381 | matrix_scan_indicator(); | 281 | matrix_scan_indicator(); |
| 382 | # endif | ||
| 383 | #endif | ||
| 384 | |||
| 385 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | ||
| 386 | if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { | ||
| 387 | rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); | ||
| 388 | } | ||
| 389 | #endif | 282 | #endif |
| 390 | } | 283 | } |
| 391 | 284 | ||
| 392 | #ifdef RGBLIGHT_ENABLE | ||
| 393 | void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { | 285 | void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { |
| 394 | rgblight_sethsv_noeeprom(hue, sat, val); | 286 | rgblight_sethsv_noeeprom(hue, sat, val); |
| 395 | wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly | 287 | wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly |
| 396 | rgblight_mode_noeeprom(mode); | 288 | rgblight_mode_noeeprom(mode); |
| 397 | } | 289 | } |
| 398 | #endif | ||
| 399 | 290 | ||
| 400 | layer_state_t layer_state_set_rgb(layer_state_t state) { | 291 | layer_state_t layer_state_set_rgb(layer_state_t state) { |
| 401 | #ifdef RGBLIGHT_ENABLE | ||
| 402 | if (userspace_config.rgb_layer_change) { | 292 | if (userspace_config.rgb_layer_change) { |
| 403 | switch (get_highest_layer(state)) { | 293 | switch (get_highest_layer(state)) { |
| 404 | case _RAISE: | 294 | case _RAISE: |
| @@ -420,6 +310,9 @@ layer_state_t layer_state_set_rgb(layer_state_t state) { | |||
| 420 | case _DVORAK: | 310 | case _DVORAK: |
| 421 | rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); | 311 | rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); |
| 422 | break; | 312 | break; |
| 313 | case _WORKMAN: | ||
| 314 | rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); | ||
| 315 | break; | ||
| 423 | default: | 316 | default: |
| 424 | rgblight_set_hsv_and_mode(HSV_CYAN, mode); | 317 | rgblight_set_hsv_and_mode(HSV_CYAN, mode); |
| 425 | break; | 318 | break; |
| @@ -428,44 +321,5 @@ layer_state_t layer_state_set_rgb(layer_state_t state) { | |||
| 428 | } | 321 | } |
| 429 | } | 322 | } |
| 430 | } | 323 | } |
| 431 | #endif // RGBLIGHT_ENABLE | ||
| 432 | |||
| 433 | return state; | 324 | return state; |
| 434 | } | 325 | } |
| 435 | |||
| 436 | #ifdef RGB_MATRIX_ENABLE | ||
| 437 | # include "lib/lib8tion/lib8tion.h" | ||
| 438 | extern led_config_t g_led_config; | ||
| 439 | |||
| 440 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { | ||
| 441 | HSV hsv = {hue, sat, val}; | ||
| 442 | if (hsv.v > rgb_matrix_config.hsv.v) { | ||
| 443 | hsv.v = rgb_matrix_config.hsv.v; | ||
| 444 | } | ||
| 445 | |||
| 446 | switch (mode) { | ||
| 447 | case 1: // breathing | ||
| 448 | { | ||
| 449 | uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); | ||
| 450 | hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); | ||
| 451 | RGB rgb = hsv_to_rgb(hsv); | ||
| 452 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { | ||
| 453 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { | ||
| 454 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | ||
| 455 | } | ||
| 456 | } | ||
| 457 | break; | ||
| 458 | } | ||
| 459 | default: // Solid Color | ||
| 460 | { | ||
| 461 | RGB rgb = hsv_to_rgb(hsv); | ||
| 462 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { | ||
| 463 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { | ||
| 464 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | ||
| 465 | } | ||
| 466 | } | ||
| 467 | break; | ||
| 468 | } | ||
| 469 | } | ||
| 470 | } | ||
| 471 | #endif | ||
diff --git a/users/curry/rgb_lighting_user.h b/users/curry/rgb_lighting_user.h new file mode 100644 index 000000000..91d7a7061 --- /dev/null +++ b/users/curry/rgb_lighting_user.h | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | typedef struct { | ||
| 4 | bool enabled; | ||
| 5 | uint8_t hue; | ||
| 6 | uint16_t timer; | ||
| 7 | uint8_t life; | ||
| 8 | } rgblight_fadeout; | ||
| 9 | |||
| 10 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); | ||
| 11 | void keyboard_post_init_rgb(void); | ||
| 12 | void matrix_scan_rgb(void); | ||
| 13 | layer_state_t layer_state_set_rgb(layer_state_t state); | ||
| 14 | layer_state_t default_layer_state_set_rgb(layer_state_t state); | ||
| 15 | void rgblight_sethsv_default_helper(uint8_t index); | ||
| 16 | |||
| 17 | #if defined(RGBLIGHT_TWINKLE) | ||
| 18 | void scan_rgblight_fadeout(void); | ||
| 19 | #endif | ||
diff --git a/users/curry/rgb_matrix_user.c b/users/curry/rgb_matrix_user.c new file mode 100644 index 000000000..d1698b087 --- /dev/null +++ b/users/curry/rgb_matrix_user.c | |||
| @@ -0,0 +1,144 @@ | |||
| 1 | #include "curry.h" | ||
| 2 | #include "rgb_matrix_user.h" | ||
| 3 | #include "lib/lib8tion/lib8tion.h" | ||
| 4 | |||
| 5 | static uint32_t hypno_timer; | ||
| 6 | extern led_config_t g_led_config; | ||
| 7 | |||
| 8 | #define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL | ||
| 9 | |||
| 10 | void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } | ||
| 11 | |||
| 12 | void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } | ||
| 13 | |||
| 14 | void check_default_layer(uint8_t mode, uint8_t type) { | ||
| 15 | switch (get_highest_layer(default_layer_state)) { | ||
| 16 | case _QWERTY: | ||
| 17 | rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); | ||
| 18 | break; | ||
| 19 | case _COLEMAK: | ||
| 20 | rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type); | ||
| 21 | break; | ||
| 22 | case _DVORAK: | ||
| 23 | rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type); | ||
| 24 | break; | ||
| 25 | case _WORKMAN: | ||
| 26 | rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type); | ||
| 27 | break; | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | void rgb_matrix_indicators_user(void) { | ||
| 32 | if (userspace_config.rgb_layer_change && !g_suspend_state && rgb_matrix_config.enable) { | ||
| 33 | switch (get_highest_layer(layer_state)) { | ||
| 34 | case _RAISE: | ||
| 35 | rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 36 | break; | ||
| 37 | case _LOWER: | ||
| 38 | rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 39 | break; | ||
| 40 | case _ADJUST: | ||
| 41 | rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 42 | break; | ||
| 43 | default: { | ||
| 44 | check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW); | ||
| 45 | break; | ||
| 46 | } | ||
| 47 | } | ||
| 48 | check_default_layer(0, LED_FLAG_MODIFIER); | ||
| 49 | } | ||
| 50 | } | ||
| 51 | |||
| 52 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | ||
| 53 | uint16_t temp_keycode = keycode; | ||
| 54 | // Filter out the actual keycode from MT and LT keys. | ||
| 55 | if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { | ||
| 56 | temp_keycode &= 0xFF; | ||
| 57 | } | ||
| 58 | |||
| 59 | hypno_timer = timer_read32(); | ||
| 60 | if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { | ||
| 61 | rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); | ||
| 62 | } | ||
| 63 | |||
| 64 | switch (temp_keycode) { | ||
| 65 | case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal | ||
| 66 | if (record->event.pressed) { | ||
| 67 | userspace_config.rgb_layer_change ^= 1; | ||
| 68 | dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); | ||
| 69 | eeconfig_update_user(userspace_config.raw); | ||
| 70 | if (userspace_config.rgb_layer_change) { | ||
| 71 | layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) | ||
| 72 | } | ||
| 73 | } | ||
| 74 | break; | ||
| 75 | case RGB_IDL: // This allows me to use underglow as layer indication, or as normal | ||
| 76 | if (record->event.pressed) { | ||
| 77 | userspace_config.rgb_matrix_idle_anim ^= 1; | ||
| 78 | dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); | ||
| 79 | eeconfig_update_user(userspace_config.raw); | ||
| 80 | if (userspace_config.rgb_matrix_idle_anim) { | ||
| 81 | rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); | ||
| 82 | } | ||
| 83 | } | ||
| 84 | break; | ||
| 85 | case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions | ||
| 86 | if (record->event.pressed) { | ||
| 87 | bool is_eeprom_updated = false; | ||
| 88 | if (userspace_config.rgb_matrix_idle_anim) { | ||
| 89 | userspace_config.rgb_matrix_idle_anim = false; | ||
| 90 | dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); | ||
| 91 | is_eeprom_updated = true; | ||
| 92 | } | ||
| 93 | if (is_eeprom_updated) { | ||
| 94 | eeconfig_update_user(userspace_config.raw); | ||
| 95 | } | ||
| 96 | } | ||
| 97 | break; | ||
| 98 | } | ||
| 99 | return true; | ||
| 100 | } | ||
| 101 | |||
| 102 | void keyboard_post_init_rgb(void) { | ||
| 103 | if (userspace_config.rgb_matrix_idle_anim) { | ||
| 104 | rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); | ||
| 105 | } | ||
| 106 | } | ||
| 107 | |||
| 108 | void matrix_scan_rgb(void) { | ||
| 109 | if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { | ||
| 110 | rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); | ||
| 111 | } | ||
| 112 | } | ||
| 113 | |||
| 114 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { | ||
| 115 | HSV hsv = {hue, sat, val}; | ||
| 116 | if (hsv.v > rgb_matrix_config.hsv.v) { | ||
| 117 | hsv.v = rgb_matrix_config.hsv.v; | ||
| 118 | } | ||
| 119 | |||
| 120 | switch (mode) { | ||
| 121 | case 1: // breathing | ||
| 122 | { | ||
| 123 | uint16_t time = scale16by8(g_rgb_counters.tick, speed / 8); | ||
| 124 | hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); | ||
| 125 | RGB rgb = hsv_to_rgb(hsv); | ||
| 126 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { | ||
| 127 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { | ||
| 128 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | ||
| 129 | } | ||
| 130 | } | ||
| 131 | break; | ||
| 132 | } | ||
| 133 | default: // Solid Color | ||
| 134 | { | ||
| 135 | RGB rgb = hsv_to_rgb(hsv); | ||
| 136 | for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { | ||
| 137 | if (HAS_FLAGS(g_led_config.flags[i], led_type)) { | ||
| 138 | rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); | ||
| 139 | } | ||
| 140 | } | ||
| 141 | break; | ||
| 142 | } | ||
| 143 | } | ||
| 144 | } | ||
diff --git a/users/curry/rgb_matrix_user.h b/users/curry/rgb_matrix_user.h new file mode 100644 index 000000000..d7db29bff --- /dev/null +++ b/users/curry/rgb_matrix_user.h | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); | ||
| 4 | void keyboard_post_init_rgb(void); | ||
| 5 | void matrix_scan_rgb(void); | ||
| 6 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); | ||
| 7 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); | ||
diff --git a/users/curry/rgb_stuff.h b/users/curry/rgb_stuff.h deleted file mode 100644 index 50b73c1c3..000000000 --- a/users/curry/rgb_stuff.h +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | #pragma once | ||
| 2 | #include "quantum.h" | ||
| 3 | #ifdef RGB_MATRIX_ENABLE | ||
| 4 | # include "rgb_matrix.h" | ||
| 5 | #endif | ||
| 6 | |||
| 7 | #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) | ||
| 8 | typedef struct { | ||
| 9 | bool enabled; | ||
| 10 | uint8_t hue; | ||
| 11 | uint16_t timer; | ||
| 12 | uint8_t life; | ||
| 13 | } rgblight_fadeout; | ||
| 14 | #endif | ||
| 15 | |||
| 16 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); | ||
| 17 | void keyboard_post_init_rgb(void); | ||
| 18 | void matrix_scan_rgb(void); | ||
| 19 | layer_state_t layer_state_set_rgb(layer_state_t state); | ||
| 20 | layer_state_t default_layer_state_set_rgb(layer_state_t state); | ||
| 21 | |||
| 22 | #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) | ||
| 23 | void scan_rgblight_fadeout(void); | ||
| 24 | #endif | ||
| 25 | #if defined(RGBLIGHT_ENABLE) | ||
| 26 | void rgblight_sethsv_default_helper(uint8_t index); | ||
| 27 | #endif | ||
| 28 | |||
| 29 | #ifdef RGB_MATRIX_ENABLE | ||
| 30 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); | ||
| 31 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); | ||
| 32 | #endif | ||
diff --git a/users/curry/rules.mk b/users/curry/rules.mk index 2ebb80794..87d3b38ea 100644 --- a/users/curry/rules.mk +++ b/users/curry/rules.mk | |||
| @@ -1,8 +1,15 @@ | |||
| 1 | SRC += curry.c \ | 1 | SRC += curry.c \ |
| 2 | process_records.c | 2 | process_records.c |
| 3 | 3 | ||
| 4 | LTO_ENABLE = yes | 4 | # Common flags |
| 5 | SPACE_CADET_ENABLE = no | 5 | SPACE_CADET_ENABLE = no |
| 6 | LTO_ENABLE = yes | ||
| 7 | EXTRAKEY_ENABLE = yes | ||
| 8 | UNICODE_ENABLE = yes | ||
| 9 | NKRO_ENABLE = yes | ||
| 10 | EXTRAKEY_ENABLE = yes | ||
| 11 | LEADER_ENABLE = yes | ||
| 12 | TAP_DANCE_ENABLE = no | ||
| 6 | 13 | ||
| 7 | ifneq ($(strip $(NO_SECRETS)), yes) | 14 | ifneq ($(strip $(NO_SECRETS)), yes) |
| 8 | ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") | 15 | ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") |
| @@ -21,8 +28,12 @@ ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) | |||
| 21 | SRC += oled.c | 28 | SRC += oled.c |
| 22 | endif | 29 | endif |
| 23 | 30 | ||
| 31 | ifeq ($(strip $(LEADER_ENABLE)), yes) | ||
| 32 | SRC += leader.c | ||
| 33 | endif | ||
| 34 | |||
| 24 | ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) | 35 | ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) |
| 25 | SRC += rgb_stuff.c | 36 | SRC += rgb_lighting_user.c |
| 26 | ifeq ($(strip $(INDICATOR_LIGHTS)), yes) | 37 | ifeq ($(strip $(INDICATOR_LIGHTS)), yes) |
| 27 | OPT_DEFS += -DINDICATOR_LIGHTS | 38 | OPT_DEFS += -DINDICATOR_LIGHTS |
| 28 | endif | 39 | endif |
| @@ -39,10 +50,9 @@ endif | |||
| 39 | 50 | ||
| 40 | RGB_MATRIX_ENABLE ?= no | 51 | RGB_MATRIX_ENABLE ?= no |
| 41 | ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) | 52 | ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) |
| 42 | SRC += rgb_stuff.c | 53 | SRC += rgb_matrix_user.c |
| 43 | endif | 54 | endif |
| 44 | 55 | ||
| 45 | |||
| 46 | ifdef CONSOLE_ENABLE | 56 | ifdef CONSOLE_ENABLE |
| 47 | ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) | 57 | ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) |
| 48 | OPT_DEFS += -DKEYLOGGER_ENABLE | 58 | OPT_DEFS += -DKEYLOGGER_ENABLE |
diff --git a/users/curry/tap_dances.c b/users/curry/tap_dances.c index fe62def0d..166ea2c68 100644 --- a/users/curry/tap_dances.c +++ b/users/curry/tap_dances.c | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | #include "tap_dances.h" | ||
| 1 | #include "curry.h" | 2 | #include "curry.h" |
| 2 | 3 | ||
| 3 | qk_tap_dance_action_t tap_dance_actions[] = {}; | 4 | qk_tap_dance_action_t tap_dance_actions[] = {}; |
diff --git a/users/curry/tap_dances.h b/users/curry/tap_dances.h index 43ce12ffc..6f70f09be 100644 --- a/users/curry/tap_dances.h +++ b/users/curry/tap_dances.h | |||
| @@ -1,3 +1 @@ | |||
| 1 | #pragma once | #pragma once | |
| 2 | #include "curry.h" | ||
| 3 | |||
diff --git a/users/curry/wrappers.h b/users/curry/wrappers.h index fa181af2e..62e89a717 100644 --- a/users/curry/wrappers.h +++ b/users/curry/wrappers.h | |||
| @@ -15,18 +15,6 @@ expanded before being used as arguments to the LAYOUT_xxx macro. | |||
| 15 | #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) | 15 | #define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) |
| 16 | #define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) | 16 | #define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) |
| 17 | 17 | ||
| 18 | /* | ||
| 19 | Blocks for each of the four major keyboard layouts | ||
| 20 | Organized so we can quickly adapt and modify all of them | ||
| 21 | at once, rather than for each keyboard, one at a time. | ||
| 22 | And this allows for much cleaner blocks in the keymaps. | ||
| 23 | For instance Tap/Hold for Control on all of the layouts | ||
| 24 | |||
| 25 | NOTE: These are all the same length. If you do a search/replace | ||
| 26 | then you need to add/remove underscores to keep the | ||
| 27 | lengths consistent. | ||
| 28 | */ | ||
| 29 | |||
| 30 | #define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T | 18 | #define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T |
| 31 | #define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G | 19 | #define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G |
| 32 | #define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B | 20 | #define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B |
| @@ -51,6 +39,14 @@ NOTE: These are all the same length. If you do a search/replace | |||
| 51 | #define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S | 39 | #define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S |
| 52 | #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z | 40 | #define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z |
| 53 | 41 | ||
| 42 | #define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B | ||
| 43 | #define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G | ||
| 44 | #define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V | ||
| 45 | |||
| 46 | #define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN | ||
| 47 | #define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I | ||
| 48 | #define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH | ||
| 49 | |||
| 54 | 50 | ||
| 55 | #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 | 51 | #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 |
| 56 | #define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 | 52 | #define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 |
| @@ -67,26 +63,26 @@ NOTE: These are all the same length. If you do a search/replace | |||
| 67 | 63 | ||
| 68 | #define _________________LOWER_L1__________________ _________________FUNC_LEFT_________________ | 64 | #define _________________LOWER_L1__________________ _________________FUNC_LEFT_________________ |
| 69 | #define _________________LOWER_L2__________________ _________________SYM_LEFT__________________ | 65 | #define _________________LOWER_L2__________________ _________________SYM_LEFT__________________ |
| 70 | #define _________________LOWER_L3__________________ KC_DT1, KC_DT2, KC_DT3, KC_DT4, _______ | 66 | #define _________________LOWER_L3__________________ KC_DT1, KC_DT2, KC_DT3, KC_DT4, KC_CCCV |
| 71 | 67 | ||
| 72 | #define _________________LOWER_R1__________________ _________________FUNC_RIGHT________________ | 68 | #define _________________LOWER_R1__________________ _________________FUNC_RIGHT________________ |
| 73 | #define _________________LOWER_R2__________________ _________________SYM_RIGHT_________________ | 69 | #define _________________LOWER_R2__________________ _________________SYM_RIGHT_________________ |
| 74 | #define _________________LOWER_R3__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR | 70 | #define _________________LOWER_R3__________________ KC_DQUO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR |
| 75 | 71 | ||
| 76 | #define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ | 72 | #define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ |
| 77 | #define _________________RAISE_L2__________________ KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______ | 73 | #define _________________RAISE_L2__________________ KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______ |
| 78 | #define _________________RAISE_L3__________________ _______, _______, _______, _______, _______ | 74 | #define _________________RAISE_L3__________________ UC_FLIP, UC_TABL, UC_SHRG, UC_DISA, _______ |
| 79 | 75 | ||
| 80 | #define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ | 76 | #define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ |
| 81 | #define _________________RAISE_R2__________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ | 77 | #define _________________RAISE_R2__________________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ |
| 82 | #define _________________RAISE_R3__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC | 78 | #define _________________RAISE_R3__________________ KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC |
| 83 | 79 | ||
| 84 | #define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG | 80 | #define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG |
| 85 | #define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM | 81 | #define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM |
| 86 | #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T | 82 | #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T |
| 87 | 83 | ||
| 88 | #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 | 84 | #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 |
| 89 | #define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, XXXXXXX | 85 | #define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN |
| 90 | #define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT | 86 | #define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT |
| 91 | 87 | ||
| 92 | // clang-format on | 88 | // clang-format on |
