diff options
| author | Drashna Jaelre <drashna@live.com> | 2021-12-29 20:17:34 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-12-29 20:17:34 -0800 |
| commit | c4551d7ef1ed2c1069f23cc8499b7c7fc30f3ecf (patch) | |
| tree | 67dc381a45d59626132c4c59b71c4b36fa971f8b /keyboards | |
| parent | 1a8a842cfb3e87a82afb57ba29ca59c5fa6fe97b (diff) | |
| download | qmk_firmware-c4551d7ef1ed2c1069f23cc8499b7c7fc30f3ecf.tar.gz qmk_firmware-c4551d7ef1ed2c1069f23cc8499b7c7fc30f3ecf.zip | |
[Keymap] Reorganization, cleanup and readmes for drashna code (#15617)
Diffstat (limited to 'keyboards')
10 files changed, 90 insertions, 219 deletions
diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c index 78a7db67a..290ea22c5 100644 --- a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c | |||
| @@ -115,103 +115,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 115 | ), | 115 | ), |
| 116 | }; | 116 | }; |
| 117 | // clang-format on | 117 | // clang-format on |
| 118 | |||
| 119 | #ifdef POINTING_DEVICE_ENABLE | ||
| 120 | static uint16_t mouse_timer = 0; | ||
| 121 | static uint16_t mouse_debounce_timer = 0; | ||
| 122 | static uint8_t mouse_keycode_tracker = 0; | ||
| 123 | bool tap_toggling = false; | ||
| 124 | |||
| 125 | void process_mouse_user(report_mouse_t* mouse_report, int8_t x, int8_t y) { | ||
| 126 | if ((x || y) && timer_elapsed(mouse_timer) > 125) { | ||
| 127 | mouse_timer = timer_read(); | ||
| 128 | if (!layer_state_is(_MOUSE) && !(layer_state_is(_GAMEPAD) || layer_state_is(_DIABLO)) && timer_elapsed(mouse_debounce_timer) > 125) { | ||
| 129 | layer_on(_MOUSE); | ||
| 130 | } | ||
| 131 | } | ||
| 132 | |||
| 133 | # ifdef TAPPING_TERM_PER_KEY | ||
| 134 | if (timer_elapsed(mouse_debounce_timer) > get_tapping_term(KC_BTN1, NULL) | ||
| 135 | # else | ||
| 136 | if (timer_elapsed(mouse_debounce_timer) > TAPPING_TERM | ||
| 137 | # endif | ||
| 138 | || (layer_state_is(_GAMEPAD) || layer_state_is(_DIABLO))) { | ||
| 139 | mouse_report->x = x; | ||
| 140 | mouse_report->y = y; | ||
| 141 | } | ||
| 142 | # ifdef OLED_ENABLE | ||
| 143 | if (x || y) oled_timer = timer_read32(); | ||
| 144 | # endif | ||
| 145 | } | ||
| 146 | |||
| 147 | void matrix_scan_keymap(void) { | ||
| 148 | if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker && !tap_toggling) { | ||
| 149 | layer_off(_MOUSE); | ||
| 150 | } | ||
| 151 | if (tap_toggling) { | ||
| 152 | if (!layer_state_is(_MOUSE)) { | ||
| 153 | layer_on(_MOUSE); | ||
| 154 | } | ||
| 155 | } | ||
| 156 | } | ||
| 157 | |||
| 158 | bool process_record_keymap(uint16_t keycode, keyrecord_t* record) { | ||
| 159 | switch (keycode) { | ||
| 160 | case TT(_MOUSE): | ||
| 161 | { | ||
| 162 | if (record->event.pressed) { | ||
| 163 | mouse_keycode_tracker++; | ||
| 164 | } else { | ||
| 165 | # if TAPPING_TOGGLE != 0 | ||
| 166 | if (record->tap.count == TAPPING_TOGGLE) { | ||
| 167 | tap_toggling ^= 1; | ||
| 168 | # if TAPPING_TOGGLE == 1 | ||
| 169 | if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1; | ||
| 170 | # else | ||
| 171 | if (!tap_toggling) mouse_keycode_tracker -= record->tap.count; | ||
| 172 | # endif | ||
| 173 | } else { | ||
| 174 | mouse_keycode_tracker--; | ||
| 175 | } | ||
| 176 | # endif | ||
| 177 | } | ||
| 178 | mouse_timer = timer_read(); | ||
| 179 | break; | ||
| 180 | } | ||
| 181 | case MO(_MOUSE): | ||
| 182 | case DPI_CONFIG: | ||
| 183 | case KC_MS_UP ... KC_MS_WH_RIGHT: | ||
| 184 | record->event.pressed ? mouse_keycode_tracker++ : mouse_keycode_tracker--; | ||
| 185 | mouse_timer = timer_read(); | ||
| 186 | break; | ||
| 187 | default: | ||
| 188 | if (layer_state_is(_MOUSE) && !mouse_keycode_tracker) { | ||
| 189 | layer_off(_MOUSE); | ||
| 190 | } | ||
| 191 | mouse_keycode_tracker = 0; | ||
| 192 | mouse_debounce_timer = timer_read(); | ||
| 193 | break; | ||
| 194 | } | ||
| 195 | return true; | ||
| 196 | } | ||
| 197 | |||
| 198 | layer_state_t layer_state_set_keymap(layer_state_t state) { | ||
| 199 | if (layer_state_cmp(state, _GAMEPAD) || layer_state_cmp(state, _DIABLO)) { | ||
| 200 | state |= (1UL << _MOUSE); | ||
| 201 | } | ||
| 202 | return state; | ||
| 203 | } | ||
| 204 | #endif | ||
| 205 | |||
| 206 | void matrix_init_keymap(void) { | ||
| 207 | #ifdef AUDIO_ENABLE | ||
| 208 | extern audio_config_t audio_config; | ||
| 209 | |||
| 210 | if (!is_keyboard_master()) { | ||
| 211 | audio_stop_all(); | ||
| 212 | audio_config.enable = false; | ||
| 213 | } | ||
| 214 | #endif | ||
| 215 | } | ||
| 216 | |||
| 217 | void keyboard_post_init_keymap(void) { matrix_init_keymap(); } | ||
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk index 9b9032837..0765bb2c6 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk | |||
| @@ -1,14 +1,34 @@ | |||
| 1 | RGBLIGHT_ENABLE = yes | 1 | COMMAND_ENABLE = no |
| 2 | RGBLIGHT_STARTUP_ANIMATION = yes | 2 | RGBLIGHT_ENABLE = yes |
| 3 | AUDIO_ENABLE = yes | 3 | RGBLIGHT_STARTUP_ANIMATION = yes |
| 4 | HAPTIC_ENABLE = no | 4 | AUDIO_ENABLE = yes |
| 5 | COMMAND_ENABLE = no | 5 | HAPTIC_ENABLE = no |
| 6 | TAP_DANCE_ENABLE = yes | 6 | TAP_DANCE_ENABLE = yes |
| 7 | UNICODE_ENABLE = yes | 7 | OLED_ENABLE = yes |
| 8 | OLED_ENABLE = yes | 8 | WPM_ENABLE = yes |
| 9 | WPM_ENABLE = yes | 9 | ENCODER_ENABLE = yes |
| 10 | ENCODER_ENABLE = yes | 10 | ENCODER_MAP_ENABLE = yes |
| 11 | ENCODER_MAP_ENABLE = yes | 11 | AUTOCORRECTION_ENABLE = yes |
| 12 | # DEBOUNCE_TYPE = sym_eager_pk | 12 | CAPS_WORD_ENABLE = yes |
| 13 | 13 | ||
| 14 | LTO_SUPPORTED = no | 14 | ifeq ($(strip $(KEYBOARD)), handwired/tractyl_manuform/5x6_right/elite_c) |
| 15 | RGBLIGHT_ENABLE = no | ||
| 16 | AUDIO_ENABLE = no | ||
| 17 | HAPTIC_ENABLE = no | ||
| 18 | TAP_DANCE_ENABLE = no | ||
| 19 | OLED_ENABLE = no | ||
| 20 | WPM_ENABLE = no | ||
| 21 | ENCODER_ENABLE = no | ||
| 22 | AUTOCORRECTION_ENABLE = no | ||
| 23 | LTO_SUPPORTED = yes | ||
| 24 | SWAP_HANDS_ENABLE = no | ||
| 25 | CUSTOM_UNICODE_ENABLE = no | ||
| 26 | CAPS_WORD_ENABLE = no | ||
| 27 | BOOTLOADER = qmk-hid | ||
| 28 | BOOTLOADER_SIZE = 512 | ||
| 29 | endif | ||
| 30 | ifeq ($(strip $(KEYBOARD)), handwired/tractyl_manuform/5x6_right/teensy2pp) | ||
| 31 | AUTOCORRECTION_ENABLE = no | ||
| 32 | CAPS_WORD_ENABLE = yes | ||
| 33 | endif | ||
| 34 | # DEBOUNCE_TYPE = sym_eager_pk | ||
diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h index f68166c98..cf67aa698 100644 --- a/keyboards/keebio/iris/keymaps/drashna/config.h +++ b/keyboards/keebio/iris/keymaps/drashna/config.h | |||
| @@ -16,15 +16,6 @@ | |||
| 16 | 16 | ||
| 17 | #pragma once | 17 | #pragma once |
| 18 | 18 | ||
| 19 | /* Use I2C or Serial, not both */ | ||
| 20 | |||
| 21 | // #define USE_SERIAL | ||
| 22 | #define USE_I2C | ||
| 23 | |||
| 24 | /* Select hand configuration */ | ||
| 25 | |||
| 26 | // #define MASTER_LEFT | ||
| 27 | // #define MASTER_RIGHT | ||
| 28 | #define EE_HANDS | 19 | #define EE_HANDS |
| 29 | 20 | ||
| 30 | #ifdef RGBLIGHT_ENABLE | 21 | #ifdef RGBLIGHT_ENABLE |
diff --git a/keyboards/keebio/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk index ca140d76c..51b9a105d 100644 --- a/keyboards/keebio/iris/keymaps/drashna/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk | |||
| @@ -4,7 +4,6 @@ EXTRAKEY_ENABLE = yes # Audio control and System control | |||
| 4 | CONSOLE_ENABLE = no # Console for debug | 4 | CONSOLE_ENABLE = no # Console for debug |
| 5 | COMMAND_ENABLE = no # Commands for debug and configuration | 5 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 6 | TAP_DANCE_ENABLE = no | 6 | TAP_DANCE_ENABLE = no |
| 7 | RGBLIGHT_ENABLE = yes | ||
| 8 | AUDIO_ENABLE = no | 7 | AUDIO_ENABLE = no |
| 9 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 10 | BACKLIGHT_ENABLE = no | 9 | BACKLIGHT_ENABLE = no |
| @@ -15,3 +14,7 @@ INDICATOR_LIGHTS = no | |||
| 15 | RGBLIGHT_STARTUP_ANIMATION = no | 14 | RGBLIGHT_STARTUP_ANIMATION = no |
| 16 | CUSTOM_UNICODE_ENABLE = no | 15 | CUSTOM_UNICODE_ENABLE = no |
| 17 | CUSTOM_SPLIT_TRANSPORT_SYNC = no | 16 | CUSTOM_SPLIT_TRANSPORT_SYNC = no |
| 17 | |||
| 18 | ifneq ($(strip $(KEYBOARD)), keebio/iris/rev6) | ||
| 19 | RGBLIGHT_ENABLE = yes | ||
| 20 | endif | ||
diff --git a/keyboards/moonlander/keymaps/drashna/keymap.c b/keyboards/moonlander/keymaps/drashna/keymap.c index 1b5280e74..82abdb005 100644 --- a/keyboards/moonlander/keymaps/drashna/keymap.c +++ b/keyboards/moonlander/keymaps/drashna/keymap.c | |||
| @@ -63,27 +63,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 63 | 63 | ||
| 64 | 64 | ||
| 65 | [_GAMEPAD] = LAYOUT_moonlander_wrapper( | 65 | [_GAMEPAD] = LAYOUT_moonlander_wrapper( |
| 66 | KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, HYPR(KC_Q), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, | 66 | KC_ESC, XXXXXXX, KC_1, KC_2, KC_3, KC_4, HYPR(KC_Q), _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_NO, |
| 67 | KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | 67 | KC_F1, KC_K, KC_Q, KC_W, KC_E, KC_R, KC_T, UC_SHRG, UC_DISA, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 68 | KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, KC_TRNS, TG_GAME, KC_I, KC_O, KC_NO, KC_NO, KC_NO, KC_NO, | 68 | KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, TG_GAME, KC_I, KC_O, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 69 | KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, | 69 | KC_LCTL, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 70 | KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, | 70 | KC_GRV, KC_U, KC_I, KC_Y, KC_T, KC_PSCR, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, |
| 71 | KC_V, KC_SPC, KC_H, KC_NO, KC_NO, KC_SWAP_NUM | 71 | KC_V, KC_SPC, KC_H, KC_NO, XXXXXXX,KC_SWAP_NUM |
| 72 | ), | 72 | ), |
| 73 | [_DIABLO] = LAYOUT_moonlander_wrapper( | 73 | [_DIABLO] = LAYOUT_moonlander_wrapper( |
| 74 | KC_ESC, KC_V, KC_D, KC_LALT, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, | 74 | KC_ESC, KC_V, KC_D, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_NO, |
| 75 | KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | 75 | KC_TAB, KC_S, KC_I, KC_F, KC_M, KC_T, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 76 | KC_NO, KC_1, KC_2, KC_3, KC_4, KC_G, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | 76 | XXXXXXX, KC_1, KC_2, KC_3, KC_4, KC_G, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 77 | KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, | 77 | KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 78 | KC_NO, KC_NO, KC_L, KC_J, KC_F, KC_PSCR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | 78 | XXXXXXX, XXXXXXX, KC_L, KC_J, KC_F, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 79 | KC_DIABLO_CLEAR, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_PGDN, KC_DEL, KC_ENT | 79 | KC_DIABLO_CLEAR, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_PGDN, KC_DEL, KC_ENT |
| 80 | ), | 80 | ), |
| 81 | [_DIABLOII] = LAYOUT_moonlander_wrapper( | 81 | [_DIABLOII] = LAYOUT_moonlander_wrapper( |
| 82 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_GRV, KC_NO, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, | 82 | KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_GRV, XXXXXXX, _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, KC_NO, |
| 83 | KC_TAB, KC_A, KC_T, KC_Q, KC_I, KC_M, TG(_DIABLOII), KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | 83 | KC_TAB, KC_A, KC_T, KC_Q, KC_I, KC_M, TG(_DIABLOII), _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 84 | KC_S, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | 84 | KC_S, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 85 | KC_LCTL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_N, KC_M, KC_NO, KC_NO, KC_NO, KC_NO, | 85 | KC_LCTL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 86 | KC_NO, KC_NO, KC_G, KC_F, KC_L, KC_V, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | 86 | XXXXXXX, XXXXXXX, KC_G, KC_F, KC_L, KC_V, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, |
| 87 | KC_G, KC_LSFT, KC_LCTL, KC_PGDN, KC_DEL, KC_ENT | 87 | KC_G, KC_LSFT, KC_LCTL, KC_PGDN, KC_DEL, KC_ENT |
| 88 | ), | 88 | ), |
| 89 | 89 | ||
| @@ -164,7 +164,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | #ifdef RGB_MATRIX_ENABLE | 166 | #ifdef RGB_MATRIX_ENABLE |
| 167 | void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | 167 | bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { |
| 168 | if (layer_state_is(_GAMEPAD)) { | 168 | if (layer_state_is(_GAMEPAD)) { |
| 169 | RGB_MATRIX_INDICATOR_SET_COLOR(11, 0x00, 0xFF, 0x00); // Q | 169 | RGB_MATRIX_INDICATOR_SET_COLOR(11, 0x00, 0xFF, 0x00); // Q |
| 170 | RGB_MATRIX_INDICATOR_SET_COLOR(16, 0x00, 0xFF, 0xFF); // W | 170 | RGB_MATRIX_INDICATOR_SET_COLOR(16, 0x00, 0xFF, 0xFF); // W |
| @@ -180,37 +180,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | |||
| 180 | RGB_MATRIX_INDICATOR_SET_COLOR(20, 0x7A, 0x00, 0xFF); // 3 | 180 | RGB_MATRIX_INDICATOR_SET_COLOR(20, 0x7A, 0x00, 0xFF); // 3 |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | if (userspace_config.rgb_layer_change) { | 183 | return true; |
| 184 | switch (get_highest_layer(layer_state|default_layer_state)) { | ||
| 185 | case _DEFAULT_LAYER_1: | ||
| 186 | rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 187 | break; | ||
| 188 | case _DEFAULT_LAYER_2: | ||
| 189 | rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 190 | break; | ||
| 191 | case _DEFAULT_LAYER_3: | ||
| 192 | rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 193 | break; | ||
| 194 | case _DEFAULT_LAYER_4: | ||
| 195 | rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 196 | break; | ||
| 197 | case _GAMEPAD: | ||
| 198 | rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 199 | break; | ||
| 200 | case _DIABLO: | ||
| 201 | rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed * 8, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 202 | break; | ||
| 203 | case _RAISE: | ||
| 204 | rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 205 | break; | ||
| 206 | case _LOWER: | ||
| 207 | rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 208 | break; | ||
| 209 | case _ADJUST: | ||
| 210 | rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 211 | break; | ||
| 212 | } | ||
| 213 | } | ||
| 214 | } | 184 | } |
| 215 | #endif | 185 | #endif |
| 216 | 186 | ||
diff --git a/keyboards/moonlander/keymaps/drashna/rules.mk b/keyboards/moonlander/keymaps/drashna/rules.mk index 2a6d20bed..feb91c774 100644 --- a/keyboards/moonlander/keymaps/drashna/rules.mk +++ b/keyboards/moonlander/keymaps/drashna/rules.mk | |||
| @@ -1,4 +1,6 @@ | |||
| 1 | TAP_DANCE_ENABLE = yes | 1 | TAP_DANCE_ENABLE = yes |
| 2 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | 2 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite |
| 3 | UNICODE_ENABLE = yes | 3 | UNICODE_ENABLE = yes |
| 4 | UNICODEMAP_ENABLE = no | 4 | UNICODEMAP_ENABLE = no |
| 5 | AUTOCORRECTION_ENABLE = yes | ||
| 6 | CAPS_WORD_ENABLE = yes | ||
diff --git a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk index 2f4f4d091..3cdfe1bec 100644 --- a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk +++ b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk | |||
| @@ -1,20 +1,27 @@ | |||
| 1 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | 1 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite |
| 2 | MOUSEKEY_ENABLE = yes # Mouse keys | 2 | MOUSEKEY_ENABLE = no # Mouse keys |
| 3 | EXTRAKEY_ENABLE = yes # Audio control and System control | 3 | EXTRAKEY_ENABLE = yes # Audio control and System control |
| 4 | CONSOLE_ENABLE = yes # Console for debug | 4 | CONSOLE_ENABLE = no # Console for debug |
| 5 | COMMAND_ENABLE = no # Commands for debug and configuration | 5 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 6 | NKRO_ENABLE = yes # USB Nkey Rollover | 6 | NKRO_ENABLE = yes # USB Nkey Rollover |
| 7 | UNICODE_ENABLE = yes # Unicode | ||
| 8 | OLED_ENABLE = yes | 7 | OLED_ENABLE = yes |
| 9 | OLED_DRIVER = SSD1306 # Enables the use of OLED displays | ||
| 10 | ENCODER_ENABLE = yes # Enables the use of one or more encoders | 8 | ENCODER_ENABLE = yes # Enables the use of one or more encoders |
| 11 | |||
| 12 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | 9 | RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow |
| 13 | RGBLIGHT_STARTUP_ANIMATION = yes | ||
| 14 | RGB_MATRIX_ENABLE = yes | ||
| 15 | TAP_DANCE_ENABLE = yes | ||
| 16 | KEY_LOCK_ENABLE = no | 10 | KEY_LOCK_ENABLE = no |
| 17 | WPM_ENABLE = yes | 11 | WPM_ENABLE = yes |
| 18 | SWAP_HANDS_ENABLE = yes | 12 | |
| 19 | LTO_ENABLE = no | 13 | ifeq ($(strip $(KEYBOARD)), splitkb/kyria/rev1/proton_c) |
| 20 | CTPC = yes | 14 | RGB_MATRIX_ENABLE = yes |
| 15 | CONSOLE_ENABLE = yes # Console for debug | ||
| 16 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 17 | TAP_DANCE_ENABLE = yes | ||
| 18 | SWAP_HANDS_ENABLE = yes | ||
| 19 | LTO_ENABLE = no | ||
| 20 | CTPC = yes | ||
| 21 | AUTOCORRECTION_ENABLE = yes | ||
| 22 | CAPS_WORD_ENABLE = yes | ||
| 23 | else | ||
| 24 | LTO_ENABLE = yes | ||
| 25 | BOOTLOADER = qmk-hid | ||
| 26 | BOOTLOADER_SIZE = 512 | ||
| 27 | endif | ||
diff --git a/keyboards/work_louder/work_board/keymaps/drashna/config.h b/keyboards/work_louder/work_board/keymaps/drashna/config.h index 5ea4dc7e4..b3bcaca25 100644 --- a/keyboards/work_louder/work_board/keymaps/drashna/config.h +++ b/keyboards/work_louder/work_board/keymaps/drashna/config.h | |||
| @@ -15,3 +15,8 @@ | |||
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | #pragma once | 17 | #pragma once |
| 18 | |||
| 19 | #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 12 | ||
| 20 | |||
| 21 | #undef RGB_MATRIX_MAXIMUM_BRIGHTNESS | ||
| 22 | #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 | ||
diff --git a/keyboards/work_louder/work_board/keymaps/drashna/keymap.c b/keyboards/work_louder/work_board/keymaps/drashna/keymap.c index 3bbb81bf0..3b0f4921a 100644 --- a/keyboards/work_louder/work_board/keymaps/drashna/keymap.c +++ b/keyboards/work_louder/work_board/keymaps/drashna/keymap.c | |||
| @@ -126,45 +126,12 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 126 | 126 | ||
| 127 | #endif | 127 | #endif |
| 128 | 128 | ||
| 129 | void rgb_matrix_indicators_user(void) {} | 129 | bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) { |
| 130 | |||
| 131 | void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | ||
| 132 | uint8_t this_mod = get_mods(); | 130 | uint8_t this_mod = get_mods(); |
| 133 | uint8_t this_led = host_keyboard_leds(); | 131 | uint8_t this_led = host_keyboard_leds(); |
| 134 | uint8_t this_osm = get_oneshot_mods(); | 132 | uint8_t this_osm = get_oneshot_mods(); |
| 135 | #define THUMB_LED 6 | 133 | #define THUMB_LED 6 |
| 136 | #define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__) | 134 | #define RGB_MATRIX_INDICATOR_SET_COLOR_wrapper(...) RGB_MATRIX_INDICATOR_SET_COLOR(__VA_ARGS__) |
| 137 | if (!userspace_config.rgb_layer_change) { | ||
| 138 | switch (get_highest_layer(layer_state | default_layer_state)) { | ||
| 139 | case _GAMEPAD: | ||
| 140 | rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 141 | break; | ||
| 142 | case _DIABLO: | ||
| 143 | rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed * 8, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 144 | break; | ||
| 145 | case _RAISE: | ||
| 146 | rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 147 | break; | ||
| 148 | case _LOWER: | ||
| 149 | rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 150 | break; | ||
| 151 | case _ADJUST: | ||
| 152 | rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 153 | break; | ||
| 154 | case _DEFAULT_LAYER_1: | ||
| 155 | rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 156 | break; | ||
| 157 | case _DEFAULT_LAYER_2: | ||
| 158 | rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 159 | break; | ||
| 160 | case _DEFAULT_LAYER_3: | ||
| 161 | rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 162 | break; | ||
| 163 | case _DEFAULT_LAYER_4: | ||
| 164 | rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); | ||
| 165 | break; | ||
| 166 | } | ||
| 167 | } | ||
| 168 | 135 | ||
| 169 | extern bool host_driver_disabled; | 136 | extern bool host_driver_disabled; |
| 170 | if (host_driver_disabled) { | 137 | if (host_driver_disabled) { |
| @@ -214,4 +181,6 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | |||
| 214 | RGB_MATRIX_INDICATOR_SET_COLOR(4, 0xFF, 0xFF, 0x00); | 181 | RGB_MATRIX_INDICATOR_SET_COLOR(4, 0xFF, 0xFF, 0x00); |
| 215 | RGB_MATRIX_INDICATOR_SET_COLOR(5, 0xFF, 0xFF, 0x00); | 182 | RGB_MATRIX_INDICATOR_SET_COLOR(5, 0xFF, 0xFF, 0x00); |
| 216 | } | 183 | } |
| 184 | |||
| 185 | return true; | ||
| 217 | } | 186 | } |
diff --git a/keyboards/work_louder/work_board/keymaps/drashna/rules.mk b/keyboards/work_louder/work_board/keymaps/drashna/rules.mk index 363f2d0ed..6cccd5f8d 100644 --- a/keyboards/work_louder/work_board/keymaps/drashna/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/drashna/rules.mk | |||
| @@ -1,6 +1,10 @@ | |||
| 1 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | 1 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite |
| 2 | EXTRAKEY_ENABLE = yes | 2 | EXTRAKEY_ENABLE = yes |
| 3 | MOUSEKEY_ENABLE = yes | ||
| 3 | TAP_DANCE_ENABLE = no | 4 | TAP_DANCE_ENABLE = no |
| 4 | NKRO_ENABLE = yes | 5 | NKRO_ENABLE = yes |
| 5 | RGBLIGHT_STARTUP_ANIMATION = yes | 6 | RGBLIGHT_STARTUP_ANIMATION = yes |
| 6 | ENCODER_MAP_ENABLE = yes | 7 | ENCODER_MAP_ENABLE = yes |
| 8 | |||
| 9 | AUTOCORRECTION_ENABLE = no | ||
| 10 | CUSTOM_UNICODE_ENABLE = no | ||
