diff options
| author | Drashna Jaelre <drashna@live.com> | 2019-09-07 08:57:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-07 08:57:30 -0700 |
| commit | e88f80a891138d40acddcdd2b3dface8b2a57404 (patch) | |
| tree | 1fa1e8cd0bd15d10970ce55efceaffcddaf01160 | |
| parent | 79a6c6eda50671b28f32dfb73728fcc1671fe4fc (diff) | |
| download | qmk_firmware-e88f80a891138d40acddcdd2b3dface8b2a57404.tar.gz qmk_firmware-e88f80a891138d40acddcdd2b3dface8b2a57404.zip | |
[Keymap] Big Drashna code update (#6639)
* Add a quefrency keymap
* New Alt-ernate layouts
* Enable Per Key Tapping Term to preserve sanity
* Use underglow and mod lights for status on Corne
* Update the drashna_ms keymap for quefrency
* Disable Audio since there isn't enough space
* Update KC_MAKE to ues :flash target
* Cleanup ergodox layout
* Enable i2c support for Iris
* Add keymap support for CG_SWAP
* Enable RGB Matrix Shutdown mode
* enable heatmap
* Update gitlab CI to install python3
* Remove game macros
These are no longer needed, and haven't been used in ages
* Cleanup planck layout
* Add RGB Matrix fun and RGB cleanup
* Add keycode and config for RGB Matrix idle animations
* Clean up rgb idle animation code
* Add rgb idle keycode to keymaps
* Fix issues with rgb matrix idle animation
* Fix some handling for idle animation
* Reduce idle animation timeout to 15s to be more reasonable
* fix up rgb stuff
* Fix isses with rgb functions not being called for matrix
* Use custom EEPROM Magic Number so testing is easier
* Extend Default Layer macro to support a lot more layers
* Fix bjohnson macropad
* Adjust KC_MAKE to process mods for more consistent behavior
* Fix up rgb stuff on corne
* Corne OLED Overhaul
* Fixes a number of issues with weirdness.
* Fixes issues with keylogger (should be more reliable now)
* Modulaize the OLED render sections
* Rewrite layer display code
* Update URL for Font Editor
Due to odd issues, I ended up rewriting from scratch. And using PROGMEM versions, since I think I was getting memory overflows.
* Update polling rate on all keebs
* Fix planck ez layout config
* Remove macros from Viterbi
34 files changed, 423 insertions, 351 deletions
diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/keyboards/crkbd/keymaps/drashna/glcdfont.c index 28521b428..998b5c408 100644 --- a/keyboards/crkbd/keymaps/drashna/glcdfont.c +++ b/keyboards/crkbd/keymaps/drashna/glcdfont.c | |||
| @@ -9,8 +9,8 @@ | |||
| 9 | #define PROGMEM | 9 | #define PROGMEM |
| 10 | #endif | 10 | #endif |
| 11 | 11 | ||
| 12 | // Helidox 8x6 font with QMK Firmware Logo | 12 | // Corne 8x6 font with QMK Firmware Logo |
| 13 | // Online editor: http://teripom.x0.com/ | 13 | // Online editor: https://helixfonteditor.netlify.com/ |
| 14 | 14 | ||
| 15 | const unsigned char font[] PROGMEM = { | 15 | const unsigned char font[] PROGMEM = { |
| 16 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 16 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 693c53b16..36a5f5dd3 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c | |||
| @@ -8,6 +8,14 @@ extern uint8_t is_master; | |||
| 8 | // Following line allows macro to read current RGB settings | 8 | // Following line allows macro to read current RGB settings |
| 9 | extern rgblight_config_t rgblight_config; | 9 | extern rgblight_config_t rgblight_config; |
| 10 | #endif | 10 | #endif |
| 11 | #ifdef OLED_DRIVER_ENABLE | ||
| 12 | static uint32_t oled_timer = 0; | ||
| 13 | static char keylog_str[6] = {}; | ||
| 14 | static uint16_t log_timer = 0; | ||
| 15 | static const char code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; | ||
| 16 | |||
| 17 | void add_keylog(uint16_t keycode); | ||
| 18 | #endif | ||
| 11 | 19 | ||
| 12 | enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; | 20 | enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; |
| 13 | 21 | ||
| @@ -19,7 +27,7 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; | |||
| 19 | ) \ | 27 | ) \ |
| 20 | LAYOUT_wrapper( \ | 28 | LAYOUT_wrapper( \ |
| 21 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ | 29 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ |
| 22 | KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ | 30 | KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ |
| 23 | OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ | 31 | OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ |
| 24 | KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ | 32 | KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ |
| 25 | ) | 33 | ) |
| @@ -98,34 +106,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 98 | [_ADJUST] = LAYOUT_wrapper( \ | 106 | [_ADJUST] = LAYOUT_wrapper( \ |
| 99 | KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, | 107 | KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, |
| 100 | VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, | 108 | VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, |
| 101 | _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY, | 109 | MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, |
| 102 | _______, KC_NUKE, _______, _______, TG_MODS, _______ | 110 | _______, KC_NUKE, _______, _______, TG_MODS, _______ |
| 103 | ) | 111 | ) |
| 104 | }; | 112 | }; |
| 105 | // clang-format on | 113 | // clang-format on |
| 106 | 114 | ||
| 115 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 116 | if (record->event.pressed) { | ||
| 107 | #ifdef OLED_DRIVER_ENABLE | 117 | #ifdef OLED_DRIVER_ENABLE |
| 108 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } | 118 | oled_timer = timer_read32(); |
| 109 | uint16_t oled_timer; | 119 | add_keylog(keycode); |
| 110 | 120 | #endif | |
| 111 | char keylog_str[5] = {}; | 121 | #ifndef SPLIT_KEYBOARD |
| 112 | uint8_t keylogs_str_idx = 0; | 122 | if (keycode == RESET && !is_master) { |
| 113 | uint16_t log_timer = 0; | 123 | return false; |
| 124 | } | ||
| 125 | #endif | ||
| 126 | } | ||
| 127 | return true; | ||
| 128 | } | ||
| 114 | 129 | ||
| 115 | const char code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '}; | 130 | #ifdef OLED_DRIVER_ENABLE |
| 131 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } | ||
| 116 | 132 | ||
| 117 | void add_keylog(uint16_t keycode) { | 133 | void add_keylog(uint16_t keycode) { |
| 118 | if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { | 134 | if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { |
| 119 | keycode = keycode & 0xFF; | 135 | keycode = keycode & 0xFF; |
| 120 | } | 136 | } |
| 121 | 137 | ||
| 122 | for (uint8_t i = 4; i > 0; i--) { | 138 | for (uint8_t i = 4; i > 0; --i) { |
| 123 | keylog_str[i] = keylog_str[i - 1]; | 139 | keylog_str[i] = keylog_str[i - 1]; |
| 124 | } | 140 | } |
| 141 | |||
| 125 | if (keycode < 60) { | 142 | if (keycode < 60) { |
| 126 | keylog_str[0] = code_to_name[keycode]; | 143 | keylog_str[0] = code_to_name[keycode]; |
| 127 | } | 144 | } |
| 128 | keylog_str[5] = 0; | ||
| 129 | 145 | ||
| 130 | log_timer = timer_read(); | 146 | log_timer = timer_read(); |
| 131 | } | 147 | } |
| @@ -136,149 +152,118 @@ void update_log(void) { | |||
| 136 | } | 152 | } |
| 137 | } | 153 | } |
| 138 | 154 | ||
| 139 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | 155 | void render_keylogger_status(void) { |
| 140 | if (record->event.pressed) { | 156 | oled_write_P(PSTR("KLogr"), false); |
| 141 | add_keylog(keycode); | 157 | oled_write(keylog_str, false); |
| 142 | oled_timer = timer_read(); | ||
| 143 | } | ||
| 144 | return true; | ||
| 145 | } | ||
| 146 | |||
| 147 | void render_rgb_status(void) { | ||
| 148 | oled_write_ln("RGB:", false); | ||
| 149 | static char temp[20] = {0}; | ||
| 150 | snprintf(temp, sizeof(temp) + 1, "M:%3dH:%3dS:%3dV:%3d", rgb_matrix_config.mode, rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v); | ||
| 151 | oled_write(temp, false); | ||
| 152 | } | 158 | } |
| 153 | 159 | ||
| 154 | void render_status_main(void) { | 160 | void render_default_layer_state(void) { |
| 155 | /* Show Keyboard Layout */ | 161 | oled_write_P(PSTR("Lyout"), false); |
| 156 | oled_write("Lyout", false); | ||
| 157 | switch (biton32(default_layer_state)) { | 162 | switch (biton32(default_layer_state)) { |
| 158 | case _QWERTY: | 163 | case _QWERTY: |
| 159 | oled_write(" QRTY", false); | 164 | oled_write_P(PSTR(" QRTY"), false); |
| 160 | break; | 165 | break; |
| 161 | case _COLEMAK: | 166 | case _COLEMAK: |
| 162 | oled_write(" COLE", false); | 167 | oled_write_P(PSTR(" COLE"), false); |
| 163 | break; | 168 | break; |
| 164 | case _DVORAK: | 169 | case _DVORAK: |
| 165 | oled_write(" DVRK", false); | 170 | oled_write_P(PSTR(" DVRK"), false); |
| 166 | break; | 171 | break; |
| 167 | case _WORKMAN: | 172 | case _WORKMAN: |
| 168 | oled_write(" WKMN", false); | 173 | oled_write_P(PSTR(" WKMN"), false); |
| 169 | break; | 174 | break; |
| 170 | case _NORMAN: | 175 | case _NORMAN: |
| 171 | oled_write(" NORM", false); | 176 | oled_write_P(PSTR(" NORM"), false); |
| 172 | break; | 177 | break; |
| 173 | case _MALTRON: | 178 | case _MALTRON: |
| 174 | oled_write(" MLTN", false); | 179 | oled_write_P(PSTR(" MLTN"), false); |
| 175 | break; | 180 | break; |
| 176 | case _EUCALYN: | 181 | case _EUCALYN: |
| 177 | oled_write(" ECLN", false); | 182 | oled_write_P(PSTR(" ECLN"), false); |
| 178 | break; | 183 | break; |
| 179 | case _CARPLAX: | 184 | case _CARPLAX: |
| 180 | oled_write(" CRPX", false); | 185 | oled_write_P(PSTR(" CRPX"), false); |
| 181 | break; | 186 | break; |
| 182 | } | 187 | } |
| 188 | } | ||
| 183 | 189 | ||
| 184 | /* Show Lock Status (only work on master side) */ | 190 | void render_layer_state(void) { |
| 185 | uint8_t led_usb_state = host_keyboard_leds(); | 191 | oled_write_P(PSTR("LAYER"), false); |
| 186 | oled_write("Lock:", false); | 192 | oled_write_P(PSTR("Lower"), layer_state_is(_LOWER)); |
| 187 | oled_write(" ", false); | 193 | oled_write_P(PSTR("Raise"), layer_state_is(_RAISE)); |
| 188 | oled_write_ln("NUM", led_usb_state & (1 << USB_LED_NUM_LOCK)); | 194 | oled_write_P(PSTR(" Mods"), layer_state_is(_MODS)); |
| 189 | oled_write(" ", false); | 195 | } |
| 190 | oled_write("CAPS", led_usb_state & (1 << USB_LED_CAPS_LOCK)); | ||
| 191 | oled_write(" ", false); | ||
| 192 | oled_write("SCRL", led_usb_state & (1 << USB_LED_SCROLL_LOCK)); | ||
| 193 | |||
| 194 | /* Show Alt-Gui Swap options */ | ||
| 195 | oled_write("BTMGK", false); | ||
| 196 | oled_write(" ", false); | ||
| 197 | oled_write_ln("Win", !keymap_config.swap_lalt_lgui); | ||
| 198 | oled_write(" ", false); | ||
| 199 | oled_write_ln("Mac", keymap_config.swap_lalt_lgui); | ||
| 200 | |||
| 201 | # if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | ||
| 202 | /* Show RGB Options */ | ||
| 203 | render_rgb_status(); | ||
| 204 | # endif | ||
| 205 | 196 | ||
| 206 | oled_write(keylog_str, false); | 197 | void render_keylock_status(uint8_t led_usb_state) { |
| 198 | oled_write_P(PSTR("Lock:"), false); | ||
| 199 | oled_write_P(PSTR(" "), false); | ||
| 200 | oled_write_P(PSTR("NUM "), led_usb_state & (1 << USB_LED_NUM_LOCK)); | ||
| 201 | oled_write_P(PSTR(" "), false); | ||
| 202 | oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); | ||
| 203 | oled_write_P(PSTR(" "), false); | ||
| 204 | oled_write_P(PSTR("SCRL"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); | ||
| 207 | } | 205 | } |
| 208 | 206 | ||
| 209 | void render_status_secondary(void) { | 207 | void render_mod_status(uint8_t modifiers) { |
| 208 | oled_write_P(PSTR("Mods:"), false); | ||
| 209 | oled_write_P(PSTR(" SHFT"), (modifiers & MOD_MASK_SHIFT)); | ||
| 210 | oled_write_P(PSTR(" CTRL"), (modifiers & MOD_MASK_CTRL)); | ||
| 211 | oled_write_P(PSTR(" ALT "), (modifiers & MOD_MASK_ALT)); | ||
| 212 | oled_write_P(PSTR(" GUI "), (modifiers & MOD_MASK_GUI)); | ||
| 213 | } | ||
| 214 | |||
| 215 | void render_bootmagic_status(void) { | ||
| 216 | /* Show Ctrl-Gui Swap options */ | ||
| 217 | static const char PROGMEM logo[][2][3] = { | ||
| 218 | {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, | ||
| 219 | {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, | ||
| 220 | }; | ||
| 221 | oled_write_P(PSTR("BTMGK"), false); | ||
| 222 | oled_write_P(PSTR(" "), false); | ||
| 223 | oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui); | ||
| 224 | oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui); | ||
| 225 | oled_write_P(PSTR(" "), false); | ||
| 226 | oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); | ||
| 227 | oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); | ||
| 228 | oled_write_P(PSTR(" NKRO"), keymap_config.nkro); | ||
| 229 | } | ||
| 230 | |||
| 231 | void render_user_status(void) { | ||
| 232 | oled_write_P(PSTR("USER:"), false); | ||
| 233 | oled_write_P(PSTR(" Anim"), userspace_config.rgb_matrix_idle_anim); | ||
| 234 | oled_write_P(PSTR(" Layr"), userspace_config.rgb_layer_change); | ||
| 235 | oled_write_P(PSTR(" Nuke"), userspace_config.nuke_switch); | ||
| 236 | } | ||
| 237 | |||
| 238 | void render_status_main(void) { | ||
| 210 | /* Show Keyboard Layout */ | 239 | /* Show Keyboard Layout */ |
| 211 | oled_write("Lyout", false); | 240 | render_default_layer_state(); |
| 212 | switch (biton32(default_layer_state)) { | 241 | render_keylock_status(host_keyboard_leds()); |
| 213 | case _QWERTY: | 242 | render_bootmagic_status(); |
| 214 | oled_write(" QRTY", false); | 243 | render_user_status(); |
| 215 | break; | ||
| 216 | case _COLEMAK: | ||
| 217 | oled_write(" COLE", false); | ||
| 218 | break; | ||
| 219 | case _DVORAK: | ||
| 220 | oled_write(" DVRK", false); | ||
| 221 | break; | ||
| 222 | case _WORKMAN: | ||
| 223 | oled_write(" WKMN", false); | ||
| 224 | break; | ||
| 225 | case _NORMAN: | ||
| 226 | oled_write(" NORM", false); | ||
| 227 | break; | ||
| 228 | case _MALTRON: | ||
| 229 | oled_write(" MLTN", false); | ||
| 230 | break; | ||
| 231 | case _EUCALYN: | ||
| 232 | oled_write(" ECLN", false); | ||
| 233 | break; | ||
| 234 | case _CARPLAX: | ||
| 235 | oled_write(" CRPX", false); | ||
| 236 | break; | ||
| 237 | } | ||
| 238 | 244 | ||
| 239 | /* Show Activate layer */ | 245 | render_keylogger_status(); |
| 240 | oled_write("Layer", false); | 246 | } |
| 241 | switch (biton32(layer_state)) { | ||
| 242 | case _RAISE: | ||
| 243 | oled_write("Raise", false); | ||
| 244 | break; | ||
| 245 | case _LOWER: | ||
| 246 | oled_write("Lower", false); | ||
| 247 | break; | ||
| 248 | case _ADJUST: | ||
| 249 | oled_write("Adjst", false); | ||
| 250 | break; | ||
| 251 | default: | ||
| 252 | oled_write("Dflt ", false); | ||
| 253 | break; | ||
| 254 | } | ||
| 255 | 247 | ||
| 256 | /* Show Mod */ | 248 | void render_status_secondary(void) { |
| 257 | uint8_t modifiers = get_mods() | get_oneshot_mods(); | 249 | /* Show Keyboard Layout */ |
| 258 | 250 | render_default_layer_state(); | |
| 259 | oled_write("Mods:", false); | 251 | render_layer_state(); |
| 260 | oled_write(" ", false); | 252 | render_mod_status(get_mods()|get_oneshot_mods()); |
| 261 | oled_write_ln("SFT", (modifiers & MOD_MASK_SHIFT)); | ||
| 262 | oled_write(" ", false); | ||
| 263 | oled_write_ln("CTL", (modifiers & MOD_MASK_CTRL)); | ||
| 264 | oled_write(" ", false); | ||
| 265 | oled_write_ln("ALT", (modifiers & MOD_MASK_ALT)); | ||
| 266 | oled_write(" ", false); | ||
| 267 | oled_write_ln("GUI", (modifiers & MOD_MASK_GUI)); | ||
| 268 | |||
| 269 | # if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | ||
| 270 | render_rgb_status(); | ||
| 271 | # endif | ||
| 272 | 253 | ||
| 273 | /* Show logged Keys */ | 254 | render_keylogger_status(); |
| 274 | oled_write(keylog_str, false); | ||
| 275 | } | 255 | } |
| 276 | 256 | ||
| 277 | void oled_task_user(void) { | 257 | void oled_task_user(void) { |
| 278 | if (timer_elapsed(oled_timer) > 60000) { | 258 | if (timer_elapsed32(oled_timer) > 30000) { |
| 279 | oled_off(); | 259 | oled_off(); |
| 280 | return; | 260 | return; |
| 281 | } | 261 | } |
| 262 | #ifndef SPLIT_KEYBOARD | ||
| 263 | else { oled_on(); } | ||
| 264 | #endif | ||
| 265 | |||
| 266 | update_log(); | ||
| 282 | if (is_master) { | 267 | if (is_master) { |
| 283 | render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) | 268 | render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) |
| 284 | } else { | 269 | } else { |
| @@ -286,7 +271,6 @@ void oled_task_user(void) { | |||
| 286 | } | 271 | } |
| 287 | } | 272 | } |
| 288 | 273 | ||
| 289 | void matrix_scan_keymap(void) { update_log(); } | ||
| 290 | #endif | 274 | #endif |
| 291 | 275 | ||
| 292 | uint16_t get_tapping_term(uint16_t keycode) { | 276 | uint16_t get_tapping_term(uint16_t keycode) { |
| @@ -300,25 +284,43 @@ uint16_t get_tapping_term(uint16_t keycode) { | |||
| 300 | 284 | ||
| 301 | #ifdef RGB_MATRIX_ENABLE | 285 | #ifdef RGB_MATRIX_ENABLE |
| 302 | 286 | ||
| 303 | static bool is_suspended; | ||
| 304 | static bool rgb_matrix_enabled; | ||
| 305 | |||
| 306 | void suspend_power_down_keymap(void) { | 287 | void suspend_power_down_keymap(void) { |
| 307 | rgb_matrix_set_suspend_state(true); | 288 | rgb_matrix_set_suspend_state(true); |
| 308 | if (!is_suspended) { | ||
| 309 | is_suspended = true; | ||
| 310 | rgb_matrix_enabled = (bool)rgb_matrix_config.enable; | ||
| 311 | rgb_matrix_disable_noeeprom(); | ||
| 312 | } | ||
| 313 | } | 289 | } |
| 314 | 290 | ||
| 315 | void suspend_wakeup_init_keymap(void) { | 291 | void suspend_wakeup_init_keymap(void) { |
| 316 | rgb_matrix_set_suspend_state(false); | 292 | rgb_matrix_set_suspend_state(false); |
| 317 | is_suspended = false; | 293 | } |
| 318 | if (rgb_matrix_enabled) { | 294 | |
| 319 | rgb_matrix_enable_noeeprom(); | 295 | void check_default_layer(uint8_t mode, uint8_t type) { |
| 296 | switch (biton32(default_layer_state)) { | ||
| 297 | case _QWERTY: | ||
| 298 | rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); | ||
| 299 | break; | ||
| 300 | case _COLEMAK: | ||
| 301 | rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type); | ||
| 302 | break; | ||
| 303 | case _DVORAK: | ||
| 304 | rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type); | ||
| 305 | break; | ||
| 306 | case _WORKMAN: | ||
| 307 | rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type); | ||
| 308 | break; | ||
| 309 | case _NORMAN: | ||
| 310 | rgb_matrix_layer_helper(HSV_CORAL, mode, rgb_matrix_config.speed, type); | ||
| 311 | break; | ||
| 312 | case _MALTRON: | ||
| 313 | rgb_matrix_layer_helper(HSV_YELLOW, mode, rgb_matrix_config.speed, type); | ||
| 314 | break; | ||
| 315 | case _EUCALYN: | ||
| 316 | rgb_matrix_layer_helper(HSV_PINK, mode, rgb_matrix_config.speed, type); | ||
| 317 | break; | ||
| 318 | case _CARPLAX: | ||
| 319 | rgb_matrix_layer_helper(HSV_BLUE, mode, rgb_matrix_config.speed, type); | ||
| 320 | break; | ||
| 320 | } | 321 | } |
| 321 | } | 322 | } |
| 323 | |||
| 322 | void rgb_matrix_indicators_user(void) { | 324 | void rgb_matrix_indicators_user(void) { |
| 323 | if (userspace_config.rgb_layer_change && | 325 | if (userspace_config.rgb_layer_change && |
| 324 | # ifdef RGB_DISABLE_WHEN_USB_SUSPENDED | 326 | # ifdef RGB_DISABLE_WHEN_USB_SUSPENDED |
| @@ -332,51 +334,26 @@ void rgb_matrix_indicators_user(void) { | |||
| 332 | ) { | 334 | ) { |
| 333 | switch (biton32(layer_state)) { | 335 | switch (biton32(layer_state)) { |
| 334 | case _GAMEPAD: | 336 | case _GAMEPAD: |
| 335 | rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | 337 | rgb_matrix_layer_helper(HSV_ORANGE, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); |
| 336 | break; | 338 | break; |
| 337 | case _DIABLO: | 339 | case _DIABLO: |
| 338 | rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | 340 | rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); |
| 339 | break; | 341 | break; |
| 340 | case _RAISE: | 342 | case _RAISE: |
| 341 | rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | 343 | rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); |
| 342 | break; | 344 | break; |
| 343 | case _LOWER: | 345 | case _LOWER: |
| 344 | rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | 346 | rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); |
| 345 | break; | 347 | break; |
| 346 | case _ADJUST: | 348 | case _ADJUST: |
| 347 | rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | 349 | rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); |
| 348 | break; | 350 | break; |
| 349 | default: { | 351 | default: { |
| 350 | bool mods_enabled = IS_LAYER_ON(_MODS); | 352 | check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW); |
| 351 | switch (biton32(default_layer_state)) { | ||
| 352 | case _QWERTY: | ||
| 353 | rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 354 | break; | ||
| 355 | case _COLEMAK: | ||
| 356 | rgb_matrix_layer_helper(HSV_MAGENTA, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 357 | break; | ||
| 358 | case _DVORAK: | ||
| 359 | rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 360 | break; | ||
| 361 | case _WORKMAN: | ||
| 362 | rgb_matrix_layer_helper(HSV_GOLDENROD, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 363 | break; | ||
| 364 | case _NORMAN: | ||
| 365 | rgb_matrix_layer_helper(HSV_CORAL, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 366 | break; | ||
| 367 | case _MALTRON: | ||
| 368 | rgb_matrix_layer_helper(HSV_YELLOW, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 369 | break; | ||
| 370 | case _EUCALYN: | ||
| 371 | rgb_matrix_layer_helper(HSV_PINK, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 372 | break; | ||
| 373 | case _CARPLAX: | ||
| 374 | rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | ||
| 375 | break; | ||
| 376 | } | ||
| 377 | break; | 353 | break; |
| 378 | } | 354 | } |
| 379 | } | 355 | } |
| 356 | check_default_layer(0, LED_FLAG_MODIFIER); | ||
| 380 | } | 357 | } |
| 381 | } | 358 | } |
| 382 | #endif | 359 | #endif |
diff --git a/keyboards/gergo/keymaps/drashna/keymap.c b/keyboards/gergo/keymaps/drashna/keymap.c index 2843b332a..edc5a9e99 100644 --- a/keyboards/gergo/keymaps/drashna/keymap.c +++ b/keyboards/gergo/keymaps/drashna/keymap.c | |||
| @@ -17,7 +17,7 @@ | |||
| 17 | ) \ | 17 | ) \ |
| 18 | LAYOUT_gergo_wrapper( \ | 18 | LAYOUT_gergo_wrapper( \ |
| 19 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \ | 19 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \ |
| 20 | KC_TAB, K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, KC_QUOT, \ | 20 | KC_TAB, K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ |
| 21 | OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ | 21 | OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ |
| 22 | KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \ | 22 | KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \ |
| 23 | ) | 23 | ) |
diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h index ee8ac8aff..6fff5d72c 100644 --- a/keyboards/keebio/iris/keymaps/drashna/config.h +++ b/keyboards/keebio/iris/keymaps/drashna/config.h | |||
| @@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 19 | 19 | ||
| 20 | /* Use I2C or Serial, not both */ | 20 | /* Use I2C or Serial, not both */ |
| 21 | 21 | ||
| 22 | #define USE_SERIAL | 22 | // #define USE_SERIAL |
| 23 | // #define USE_I2C | 23 | #define USE_I2C |
| 24 | 24 | ||
| 25 | /* Select hand configuration */ | 25 | /* Select hand configuration */ |
| 26 | 26 | ||
diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index fe10cb275..28783dd8a 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | LAYOUT_wrapper( \ | 11 | LAYOUT_wrapper( \ |
| 12 | KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ | 12 | KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ |
| 13 | KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ | 13 | KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ |
| 14 | KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ | 14 | KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ |
| 15 | OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ | 15 | OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ |
| 16 | KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ | 16 | KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ |
| 17 | ) | 17 | ) |
diff --git a/keyboards/keebio/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk index 17acd32be..cb398cd4e 100644 --- a/keyboards/keebio/iris/keymaps/drashna/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk | |||
| @@ -5,14 +5,13 @@ CONSOLE_ENABLE = no # Console for debug(+400) | |||
| 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 | 7 | RGBLIGHT_ENABLE = yes |
| 8 | AUDIO_ENABLE = yes | 8 | AUDIO_ENABLE = no |
| 9 | NKRO_ENABLE = yes | 9 | NKRO_ENABLE = yes |
| 10 | BACKLIGHT_ENABLE = no | 10 | BACKLIGHT_ENABLE = no |
| 11 | SWAP_HANDS_ENABLE = no | 11 | SWAP_HANDS_ENABLE = no |
| 12 | SPACE_CADET_ENABLE = no | 12 | SPACE_CADET_ENABLE = no |
| 13 | 13 | ||
| 14 | INDICATOR_LIGHTS = no | 14 | INDICATOR_LIGHTS = no |
| 15 | MACROS_ENABLED = no | ||
| 16 | RGBLIGHT_TWINKLE = no | 15 | RGBLIGHT_TWINKLE = no |
| 17 | RGBLIGHT_STARTUP_ANIMATION = no | 16 | RGBLIGHT_STARTUP_ANIMATION = no |
| 18 | 17 | ||
diff --git a/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h b/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h new file mode 100644 index 000000000..ec2a2ea16 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/drashna_ms/config.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | /* | ||
| 2 | This is the c configuration file for the keymap | ||
| 3 | |||
| 4 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 5 | Copyright 2015 Jack Humbert | ||
| 6 | Copyright 2018 Danny Nguyen <danny@keeb.io> | ||
| 7 | |||
| 8 | This program is free software: you can redistribute it and/or modify | ||
| 9 | it under the terms of the GNU General Public License as published by | ||
| 10 | the Free Software Foundation, either version 2 of the License, or | ||
| 11 | (at your option) any later version. | ||
| 12 | |||
| 13 | This program is distributed in the hope that it will be useful, | ||
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | GNU General Public License for more details. | ||
| 17 | |||
| 18 | You should have received a copy of the GNU General Public License | ||
| 19 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 20 | */ | ||
| 21 | |||
| 22 | #pragma once | ||
| 23 | |||
| 24 | // #define USE_I2C | ||
| 25 | #define EE_HANDS | ||
| 26 | |||
| 27 | |||
| 28 | #ifdef RGBLIGHT_ENABLE | ||
| 29 | #define RGBLIGHT_SPLIT | ||
| 30 | #undef RGBLED_NUM | ||
| 31 | #define RGBLED_NUM 17 | ||
| 32 | #define RGBLED_SPLIT { 9, 8 } | ||
| 33 | #define RGBLIGHT_SLEEP | ||
| 34 | #endif | ||
| 35 | |||
| 36 | #ifdef AUDIO_ENABLE | ||
| 37 | #define B7_AUDIO | ||
| 38 | #define AUDIO_CLICKY | ||
| 39 | #endif | ||
diff --git a/keyboards/keebio/quefrency/keymaps/drashna_ms/keymap.c b/keyboards/keebio/quefrency/keymaps/drashna_ms/keymap.c new file mode 100644 index 000000000..445709bc3 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/drashna_ms/keymap.c | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | #include "version.h" | ||
| 3 | |||
| 4 | enum layers { | ||
| 5 | _BASE, | ||
| 6 | _FN1, | ||
| 7 | }; | ||
| 8 | |||
| 9 | enum custom_keycodes { | ||
| 10 | KC_MAKE = SAFE_RANGE, | ||
| 11 | }; | ||
| 12 | |||
| 13 | |||
| 14 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 15 | [_BASE] = LAYOUT_65_with_macro( | ||
| 16 | KC_F1, KC_F2, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_HOME, \ | ||
| 17 | KC_F3, KC_F4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_END, \ | ||
| 18 | KC_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ | ||
| 19 | KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \ | ||
| 20 | KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 21 | ), | ||
| 22 | |||
| 23 | [_FN1] = LAYOUT_65_with_macro( | ||
| 24 | _______, _______, KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_BSPC, RESET, \ | ||
| 25 | _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, \ | ||
| 26 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 27 | _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 28 | _______, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 29 | ) | ||
| 30 | }; | ||
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 35 | switch (keycode) { | ||
| 36 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader | ||
| 37 | if (!record->event.pressed) | ||
| 38 | send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP ":dfu" SS_TAP(X_ENTER)), 10); | ||
| 39 | |||
| 40 | break; | ||
| 41 | } | ||
| 42 | return true; | ||
| 43 | } | ||
diff --git a/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk b/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk new file mode 100644 index 000000000..1b8b582ab --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | LINK_TIME_OPTIMIZATION_ENABLE = yes | ||
| 2 | RGBLIGHT_ENABLE = yes | ||
| 3 | EXTRAKEY_ENABLE = yes | ||
| 4 | AUDIO_ENABLE = yes | ||
| 5 | BOOTLOADER = qmk-dfu | ||
diff --git a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c index 1afc59fb9..9c17c5a57 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c | |||
| @@ -10,7 +10,6 @@ extern keymap_config_t keymap_config; | |||
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | // Fillers to make layering more clear | 12 | // Fillers to make layering more clear |
| 13 | #define LMACRO OSL(_MACROS) | ||
| 14 | #define DIABLO TG(_DIABLO) | 13 | #define DIABLO TG(_DIABLO) |
| 15 | #define GAMEPAD TG(_GAMEPAD) | 14 | #define GAMEPAD TG(_GAMEPAD) |
| 16 | #define MEDIA TT(_MEDIA) | 15 | #define MEDIA TT(_MEDIA) |
| @@ -23,7 +22,7 @@ extern keymap_config_t keymap_config; | |||
| 23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 24 | 23 | ||
| 25 | [_NUMLOCK] = LAYOUT_ortho_5x7( | 24 | [_NUMLOCK] = LAYOUT_ortho_5x7( |
| 26 | LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, | 25 | KC_NO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS, |
| 27 | MEDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST, | 26 | MEDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST, |
| 28 | KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, | 27 | KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS, |
| 29 | KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, | 28 | KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS, |
| @@ -39,22 +38,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 39 | ), | 38 | ), |
| 40 | 39 | ||
| 41 | [_GAMEPAD] = LAYOUT_ortho_5x7( // Game pad layout designed primarily for Overwatch | 40 | [_GAMEPAD] = LAYOUT_ortho_5x7( // Game pad layout designed primarily for Overwatch |
| 42 | LMACRO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, | 41 | KC_NO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4, |
| 43 | MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, | 42 | MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, |
| 44 | KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, | 43 | KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, |
| 45 | KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, | 44 | KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, |
| 46 | KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V | 45 | KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V |
| 47 | ), | 46 | ), |
| 48 | 47 | ||
| 49 | [_MACROS] = LAYOUT_ortho_5x7( | ||
| 50 | LMACRO, KC_OVERWATCH,GAMEPAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 51 | KC_C9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 52 | KC_SYMM, KC_TORB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 53 | KC_GLHF, KC_GOODGAME, KC_GGEZ, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 54 | KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, KC_PENT | ||
| 55 | ), | ||
| 56 | |||
| 57 | |||
| 58 | [_MEDIA] = LAYOUT_ortho_5x7( | 48 | [_MEDIA] = LAYOUT_ortho_5x7( |
| 59 | KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD, | 49 | KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD, |
| 60 | MEDIA, EEP_RST, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI, | 50 | MEDIA, EEP_RST, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI, |
diff --git a/keyboards/keebio/viterbi/keymaps/drashna/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk index f42e065d5..3246c1807 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/rules.mk +++ b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk | |||
| @@ -11,7 +11,6 @@ SPLIT_KEYBOARD = no | |||
| 11 | SPACE_CADET_ENABLE = no | 11 | SPACE_CADET_ENABLE = no |
| 12 | 12 | ||
| 13 | NO_SECRETS = yes | 13 | NO_SECRETS = yes |
| 14 | MACROS_ENABLED = yes | ||
| 15 | INDICATOR_LIGHTS = no | 14 | INDICATOR_LIGHTS = no |
| 16 | RGBLIGHT_TWINKLE = no | 15 | RGBLIGHT_TWINKLE = no |
| 17 | LAYOUTS = ortho_5x7 | 16 | LAYOUTS = ortho_5x7 |
diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 56799ae2c..bf6b62b41 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c | |||
| @@ -38,7 +38,7 @@ uint8_t last_osm; | |||
| 38 | ) \ | 38 | ) \ |
| 39 | LAYOUT_wrapper( \ | 39 | LAYOUT_wrapper( \ |
| 40 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ | 40 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ |
| 41 | KC_TAB, K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, KC_QUOT, \ | 41 | KC_TAB, ALT_T(K11), K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ |
| 42 | KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \ | 42 | KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \ |
| 43 | ) | 43 | ) |
| 44 | #define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) | 44 | #define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) |
diff --git a/keyboards/orthodox/keymaps/drashna/rules.mk b/keyboards/orthodox/keymaps/drashna/rules.mk index a122b9e0f..0d28c44a7 100644 --- a/keyboards/orthodox/keymaps/drashna/rules.mk +++ b/keyboards/orthodox/keymaps/drashna/rules.mk | |||
| @@ -10,7 +10,6 @@ NKRO_ENABLE = yes | |||
| 10 | SPACE_CADET_ENABLE = no | 10 | SPACE_CADET_ENABLE = no |
| 11 | 11 | ||
| 12 | INDICATOR_LIGHTS = yes | 12 | INDICATOR_LIGHTS = yes |
| 13 | MACROS_ENABLED = no | ||
| 14 | RGBLIGHT_TWINKLE = no | 13 | RGBLIGHT_TWINKLE = no |
| 15 | RGBLIGHT_STARTUP_ANIMATION = yes | 14 | RGBLIGHT_STARTUP_ANIMATION = yes |
| 16 | 15 | ||
diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 821710ed8..0ccf10c31 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h | |||
| @@ -14,3 +14,5 @@ | |||
| 14 | 14 | ||
| 15 | #undef DEBOUNCE | 15 | #undef DEBOUNCE |
| 16 | #define DEBOUNCE 15 | 16 | #define DEBOUNCE 15 |
| 17 | |||
| 18 | #define TAPPING_TERM_PER_KEY | ||
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 763b218f7..6ed4558e2 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c | |||
| @@ -23,8 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 23 | #ifndef UNICODE_ENABLE | 23 | #ifndef UNICODE_ENABLE |
| 24 | # define UC(x) KC_NO | 24 | # define UC(x) KC_NO |
| 25 | #endif | 25 | #endif |
| 26 | 26 | #ifdef RGBLIGHT_ENABLE | |
| 27 | extern userspace_config_t userspace_config; | 27 | extern rgblight_config_t rgblight_config; |
| 28 | #endif | ||
| 28 | 29 | ||
| 29 | enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; | 30 | enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; |
| 30 | 31 | ||
| @@ -40,7 +41,7 @@ bool skip_leds = false; | |||
| 40 | LAYOUT_ergodox_pretty_wrapper( \ | 41 | LAYOUT_ergodox_pretty_wrapper( \ |
| 41 | KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ | 42 | KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ |
| 42 | KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ | 43 | KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ |
| 43 | KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ | 44 | KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ |
| 44 | KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ | 45 | KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ |
| 45 | KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ | 46 | KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ |
| 46 | OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ | 47 | OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ |
| @@ -291,8 +292,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 291 | [_ADJUST] = LAYOUT_ergodox_pretty_wrapper( | 292 | [_ADJUST] = LAYOUT_ergodox_pretty_wrapper( |
| 292 | KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, | 293 | KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, |
| 293 | VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST, | 294 | VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST, |
| 294 | _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG(_MODS), | 295 | _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL, |
| 295 | _______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, KC_MPLY, | 296 | _______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, TG(_MODS), |
| 296 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | 297 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, |
| 297 | _______, _______, _______, _______, | 298 | _______, _______, _______, _______, |
| 298 | _______, _______, | 299 | _______, _______, |
| @@ -464,3 +465,13 @@ void rgb_matrix_indicators_user(void) { | |||
| 464 | } | 465 | } |
| 465 | 466 | ||
| 466 | #endif // RGB_MATRIX_INIT | 467 | #endif // RGB_MATRIX_INIT |
| 468 | |||
| 469 | |||
| 470 | uint16_t get_tapping_term(uint16_t keycode) { | ||
| 471 | if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) { | ||
| 472 | if (mod_config(keycode & 0xf) & MOD_MASK_ALT) { | ||
| 473 | return (2 * TAPPING_TERM); | ||
| 474 | } | ||
| 475 | } | ||
| 476 | return TAPPING_TERM; | ||
| 477 | } | ||
diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index f3cd55ea8..f14353f4c 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk | |||
| @@ -12,7 +12,6 @@ BOOTMAGIC_ENABLE = yes | |||
| 12 | UNICODE_ENABLE = yes | 12 | UNICODE_ENABLE = yes |
| 13 | UNICDOEMAP_ENABLE = no | 13 | UNICDOEMAP_ENABLE = no |
| 14 | 14 | ||
| 15 | MACROS_ENABLED = no | ||
| 16 | RGBLIGHT_TWINKLE = no | 15 | RGBLIGHT_TWINKLE = no |
| 17 | INDICATOR_LIGHTS = no | 16 | INDICATOR_LIGHTS = no |
| 18 | RGBLIGHT_STARTUP_ANIMATION = yes | 17 | RGBLIGHT_STARTUP_ANIMATION = yes |
diff --git a/layouts/community/numpad_5x6/bjohnson/config.h b/layouts/community/numpad_5x6/bjohnson/config.h index fe2cffec7..668450d88 100644 --- a/layouts/community/numpad_5x6/bjohnson/config.h +++ b/layouts/community/numpad_5x6/bjohnson/config.h | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) | 5 | #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) |
| 6 | #define RGB_DI_PIN B7 | 6 | #define RGB_DI_PIN B7 |
| 7 | #define RGBLED_NUM 16 // Number of LEDs | 7 | #define RGBLED_NUM 13 // Number of LEDs |
| 8 | #define RGBLIGHT_ANIMATIONS | 8 | #define RGBLIGHT_ANIMATIONS |
| 9 | 9 | ||
| 10 | #define RGBLIGHT_HUE_STEP 12 | 10 | #define RGBLIGHT_HUE_STEP 12 |
diff --git a/layouts/community/numpad_5x6/bjohnson/keymap.c b/layouts/community/numpad_5x6/bjohnson/keymap.c index 79e87e69f..4b15ccdfb 100644 --- a/layouts/community/numpad_5x6/bjohnson/keymap.c +++ b/layouts/community/numpad_5x6/bjohnson/keymap.c | |||
| @@ -25,9 +25,10 @@ void keyboard_post_init_user(void) { | |||
| 25 | uint8_t temp_mode = rgblight_config.mode; | 25 | uint8_t temp_mode = rgblight_config.mode; |
| 26 | rgblight_enable_noeeprom(); | 26 | rgblight_enable_noeeprom(); |
| 27 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); | 27 | rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); |
| 28 | for (uint16_t i = 360; i > 0; i--) { | 28 | for (uint16_t i = 255; i > 0; i--) { |
| 29 | rgblight_sethsv_noeeprom( ( i + 180) % 360, 255, 255); | 29 | rgblight_sethsv_noeeprom( ( i + 128) % 255, 255, 255); |
| 30 | wait_ms(8); | 30 | matrix_scan(); |
| 31 | wait_ms(10); | ||
| 31 | } | 32 | } |
| 32 | led_set_user(host_keyboard_leds()); | 33 | led_set_user(host_keyboard_leds()); |
| 33 | rgblight_mode_noeeprom(temp_mode); | 34 | rgblight_mode_noeeprom(temp_mode); |
diff --git a/layouts/community/numpad_5x6/drashna/rules.mk b/layouts/community/numpad_5x6/drashna/rules.mk index 62bbc365d..0bdf97bae 100644 --- a/layouts/community/numpad_5x6/drashna/rules.mk +++ b/layouts/community/numpad_5x6/drashna/rules.mk | |||
| @@ -5,6 +5,5 @@ NO_SECRETS = yes | |||
| 5 | BOOTMAGIC_ENABLE = lite | 5 | BOOTMAGIC_ENABLE = lite |
| 6 | INDICATOR_LIGHTS = no | 6 | INDICATOR_LIGHTS = no |
| 7 | RGBLIGHT_TWINKLE = yes | 7 | RGBLIGHT_TWINKLE = yes |
| 8 | MACROS_ENABLED = no | ||
| 9 | MAKE_BOOTLOADER = yes | 8 | MAKE_BOOTLOADER = yes |
| 10 | RGBLIGHT_STARTUP_ANIMATION = yes | 9 | RGBLIGHT_STARTUP_ANIMATION = yes |
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index 30db12965..9f3d2b82d 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #ifdef RGB_MATRIX_ENABLE | 17 | #ifdef RGB_MATRIX_ENABLE |
| 18 | # define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) | 18 | # define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) |
| 19 | // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) | 19 | // #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) |
| 20 | # define RGB_MATRIX_FRAMEBUFFER_EFFECTS | ||
| 20 | // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | 21 | // #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects |
| 21 | // #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 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 RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | 23 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended |
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 3e26b93fc..26f611c08 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c | |||
| @@ -27,6 +27,9 @@ enum planck_keycodes { | |||
| 27 | }; | 27 | }; |
| 28 | #else | 28 | #else |
| 29 | # define BACKLIT OSM(MOD_LSFT) | 29 | # define BACKLIT OSM(MOD_LSFT) |
| 30 | enum planck_keycodes { | ||
| 31 | TH_LVL = NEW_SAFE_RANGE, | ||
| 32 | }; | ||
| 30 | #endif | 33 | #endif |
| 31 | 34 | ||
| 32 | #ifdef KEYBOARD_planck_ez | 35 | #ifdef KEYBOARD_planck_ez |
| @@ -48,8 +51,8 @@ enum planck_keycodes { | |||
| 48 | K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ | 51 | K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ |
| 49 | ) \ | 52 | ) \ |
| 50 | LAYOUT_ortho_4x12_wrapper( \ | 53 | LAYOUT_ortho_4x12_wrapper( \ |
| 51 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ | 54 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \ |
| 52 | KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \ | 55 | KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ |
| 53 | KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \ | 56 | KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \ |
| 54 | BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | 57 | BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ |
| 55 | ) | 58 | ) |
| @@ -117,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 117 | KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, | 120 | KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, |
| 118 | KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, | 121 | KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, |
| 119 | _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, | 122 | _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, |
| 120 | _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY | 123 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 121 | ), | 124 | ), |
| 122 | 125 | ||
| 123 | [_RAISE] = LAYOUT_ortho_4x12_wrapper( | 126 | [_RAISE] = LAYOUT_ortho_4x12_wrapper( |
| @@ -130,8 +133,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 130 | [_ADJUST] = LAYOUT_ortho_4x12_wrapper( | 133 | [_ADJUST] = LAYOUT_ortho_4x12_wrapper( |
| 131 | KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, | 134 | KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST, |
| 132 | VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, | 135 | VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, |
| 133 | _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, | 136 | TH_LVL, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, |
| 134 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUKE | 137 | _______, _______, _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, TG_MODS |
| 135 | ) | 138 | ) |
| 136 | 139 | ||
| 137 | }; | 140 | }; |
| @@ -149,7 +152,20 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
| 149 | } else { | 152 | } else { |
| 150 | unregister_code(KC_RSFT); | 153 | unregister_code(KC_RSFT); |
| 151 | } | 154 | } |
| 152 | return false; | 155 | break; |
| 156 | #endif | ||
| 157 | #ifdef KEYBOARD_planck_ez | ||
| 158 | case TH_LVL: | ||
| 159 | if (record->event.pressed) { | ||
| 160 | keyboard_config.led_level++; | ||
| 161 | if (keyboard_config.led_level > 4) { | ||
| 162 | keyboard_config.led_level = 0; | ||
| 163 | } | ||
| 164 | planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); | ||
| 165 | planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); | ||
| 166 | eeconfig_update_kb(keyboard_config.raw); | ||
| 167 | layer_state_set_kb(layer_state); | ||
| 168 | } | ||
| 153 | break; | 169 | break; |
| 154 | #endif | 170 | #endif |
| 155 | } | 171 | } |
| @@ -265,7 +281,7 @@ void rgb_matrix_indicators_user(void) { | |||
| 265 | break; | 281 | break; |
| 266 | } | 282 | } |
| 267 | if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { | 283 | if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { |
| 268 | rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); | 284 | if (!layer_state_cmp(layer_state, _ADJUST)) { rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); } |
| 269 | rgb_matrix_set_color(36, 0x00, 0xFF, 0x00); | 285 | rgb_matrix_set_color(36, 0x00, 0xFF, 0x00); |
| 270 | } | 286 | } |
| 271 | if ((this_mod | this_osm) & MOD_MASK_CTRL) { | 287 | if ((this_mod | this_osm) & MOD_MASK_CTRL) { |
| @@ -353,18 +369,18 @@ void dip_update(uint8_t index, bool active) { | |||
| 353 | 369 | ||
| 354 | #ifdef KEYBOARD_planck_ez | 370 | #ifdef KEYBOARD_planck_ez |
| 355 | layer_state_t layer_state_set_keymap(layer_state_t state) { | 371 | layer_state_t layer_state_set_keymap(layer_state_t state) { |
| 356 | palClearPad(GPIOB, 8); | 372 | planck_ez_left_led_off(); |
| 357 | palClearPad(GPIOB, 9); | 373 | planck_ez_right_led_off(); |
| 358 | switch (biton32(state)) { | 374 | switch (biton32(state)) { |
| 359 | case _LOWER: | 375 | case _LOWER: |
| 360 | palSetPad(GPIOB, 9); | 376 | planck_ez_left_led_on(); |
| 361 | break; | 377 | break; |
| 362 | case _RAISE: | 378 | case _RAISE: |
| 363 | palSetPad(GPIOB, 8); | 379 | planck_ez_right_led_on(); |
| 364 | break; | 380 | break; |
| 365 | case _ADJUST: | 381 | case _ADJUST: |
| 366 | palSetPad(GPIOB, 9); | 382 | planck_ez_right_led_on(); |
| 367 | palSetPad(GPIOB, 8); | 383 | planck_ez_left_led_on(); |
| 368 | break; | 384 | break; |
| 369 | default: | 385 | default: |
| 370 | break; | 386 | break; |
diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk index 21ce7ebb1..55f3acd70 100644 --- a/layouts/community/ortho_4x12/drashna/rules.mk +++ b/layouts/community/ortho_4x12/drashna/rules.mk | |||
| @@ -33,6 +33,3 @@ NKRO_ENABLE = no | |||
| 33 | else | 33 | else |
| 34 | NKRO_ENABLE = yes | 34 | NKRO_ENABLE = yes |
| 35 | endif | 35 | endif |
| 36 | |||
| 37 | |||
| 38 | MACROS_ENABLED = no | ||
diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c index 26be99af5..86a78336c 100644 --- a/layouts/community/ortho_5x12/drashna/keymap.c +++ b/layouts/community/ortho_5x12/drashna/keymap.c | |||
| @@ -29,10 +29,11 @@ | |||
| 29 | LAYOUT_ortho_5x12_wrapper( \ | 29 | LAYOUT_ortho_5x12_wrapper( \ |
| 30 | KC_GRV, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ | 30 | KC_GRV, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ |
| 31 | KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ | 31 | KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ |
| 32 | KC_ESC, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_QUOT, \ | 32 | KC_ESC, ALT_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, K2A, RALT_T(KC_QUOT), \ |
| 33 | KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, CTL_T(K3A), KC_ENT, \ | 33 | KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, RCTL_T(K3A), KC_ENT, \ |
| 34 | KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | 34 | KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ |
| 35 | ) | 35 | ) |
| 36 | |||
| 36 | #define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) | 37 | #define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) |
| 37 | 38 | ||
| 38 | 39 | ||
| @@ -132,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 132 | [_ADJUST] = LAYOUT_ortho_5x12_wrapper( \ | 133 | [_ADJUST] = LAYOUT_ortho_5x12_wrapper( \ |
| 133 | KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, | 134 | KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST, |
| 134 | VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST, | 135 | VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST, |
| 135 | _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, _______, | 136 | _______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL, |
| 136 | _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, | 137 | _______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS, |
| 137 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 138 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 138 | ) | 139 | ) |
diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk index ee7c2ad63..0606f3e52 100644 --- a/layouts/community/ortho_5x12/drashna/rules.mk +++ b/layouts/community/ortho_5x12/drashna/rules.mk | |||
| @@ -18,6 +18,3 @@ NKRO_ENABLE = no | |||
| 18 | else | 18 | else |
| 19 | NKRO_ENABLE = yes | 19 | NKRO_ENABLE = yes |
| 20 | endif | 20 | endif |
| 21 | |||
| 22 | |||
| 23 | MACROS_ENABLED = no | ||
diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml index 679bdf435..7218a21be 100644 --- a/users/drashna/.gitlab-ci.yml +++ b/users/drashna/.gitlab-ci.yml | |||
| @@ -10,7 +10,7 @@ QMK Firmware: | |||
| 10 | image: ubuntu:18.10 | 10 | image: ubuntu:18.10 |
| 11 | before_script: | 11 | before_script: |
| 12 | - apt-get update -qy | 12 | - apt-get update -qy |
| 13 | - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr unzip wget zip | 13 | - apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr python3 unzip wget zip |
| 14 | - avr-gcc --version | 14 | - avr-gcc --version |
| 15 | - uname -a | 15 | - uname -a |
| 16 | script: | 16 | script: |
diff --git a/users/drashna/config.h b/users/drashna/config.h index 8f6e700d2..a0f92d8f3 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h | |||
| @@ -1,5 +1,11 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | // Use custom magic number so that when switching branches, EEPROM always gets reset | ||
| 4 | #define EECONFIG_MAGIC_NUMBER (uint16_t)0x1337 | ||
| 5 | |||
| 6 | /* Set Polling rate to 1000Hz */ | ||
| 7 | #define USB_POLLING_INTERVAL_MS 1 | ||
| 8 | |||
| 3 | #ifdef AUDIO_ENABLE | 9 | #ifdef AUDIO_ENABLE |
| 4 | # if __GNUC__ > 7 | 10 | # if __GNUC__ > 7 |
| 5 | # if __has_include("drashna_song_list.h") | 11 | # if __has_include("drashna_song_list.h") |
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index c1809dad0..6a436e0af 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -25,26 +25,7 @@ userspace_config_t userspace_config; | |||
| 25 | # define DRASHNA_UNICODE_MODE 2 | 25 | # define DRASHNA_UNICODE_MODE 2 |
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | // This block is for all of the gaming macros, as they were all doing | 28 | |
| 29 | // the same thing, but with differring text sent. | ||
| 30 | bool send_game_macro(const char *str, keyrecord_t *record, bool override) { | ||
| 31 | if (!record->event.pressed || override) { | ||
| 32 | uint16_t keycode; | ||
| 33 | if (userspace_config.is_overwatch) { | ||
| 34 | keycode = KC_BSPC; | ||
| 35 | } else { | ||
| 36 | keycode = KC_ENTER; | ||
| 37 | } | ||
| 38 | clear_keyboard(); | ||
| 39 | tap_code(keycode); | ||
| 40 | wait_ms(TAP_CODE_DELAY); | ||
| 41 | send_string_with_delay(str, TAP_CODE_DELAY); | ||
| 42 | wait_ms(TAP_CODE_DELAY); | ||
| 43 | tap_code(KC_ENTER); | ||
| 44 | } | ||
| 45 | if (override) wait_ms(3000); | ||
| 46 | return false; | ||
| 47 | } | ||
| 48 | 29 | ||
| 49 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { | 30 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { |
| 50 | static uint16_t this_timer; | 31 | static uint16_t this_timer; |
| @@ -123,7 +104,7 @@ __attribute__((weak)) | |||
| 123 | void keyboard_post_init_keymap(void) {} | 104 | void keyboard_post_init_keymap(void) {} |
| 124 | 105 | ||
| 125 | void keyboard_post_init_user(void) { | 106 | void keyboard_post_init_user(void) { |
| 126 | #ifdef RGBLIGHT_ENABLE | 107 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
| 127 | keyboard_post_init_rgb(); | 108 | keyboard_post_init_rgb(); |
| 128 | #endif | 109 | #endif |
| 129 | keyboard_post_init_keymap(); | 110 | keyboard_post_init_keymap(); |
| @@ -132,6 +113,8 @@ void keyboard_post_init_user(void) { | |||
| 132 | __attribute__((weak)) | 113 | __attribute__((weak)) |
| 133 | void shutdown_keymap(void) {} | 114 | void shutdown_keymap(void) {} |
| 134 | 115 | ||
| 116 | void rgb_matrix_update_pwm_buffers(void); | ||
| 117 | |||
| 135 | void shutdown_user(void) { | 118 | void shutdown_user(void) { |
| 136 | #ifdef RGBLIGHT_ENABLE | 119 | #ifdef RGBLIGHT_ENABLE |
| 137 | rgblight_enable_noeeprom(); | 120 | rgblight_enable_noeeprom(); |
| @@ -139,9 +122,9 @@ void shutdown_user(void) { | |||
| 139 | rgblight_setrgb_red(); | 122 | rgblight_setrgb_red(); |
| 140 | #endif // RGBLIGHT_ENABLE | 123 | #endif // RGBLIGHT_ENABLE |
| 141 | #ifdef RGB_MATRIX_ENABLE | 124 | #ifdef RGB_MATRIX_ENABLE |
| 142 | // uint16_t timer_start = timer_read(); | 125 | rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); |
| 143 | // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); | 126 | rgb_matrix_update_pwm_buffers(); |
| 144 | // while(timer_elapsed(timer_start) < 250) { wait_ms(1); } | 127 | |
| 145 | #endif // RGB_MATRIX_ENABLE | 128 | #endif // RGB_MATRIX_ENABLE |
| 146 | shutdown_keymap(); | 129 | shutdown_keymap(); |
| 147 | } | 130 | } |
| @@ -176,7 +159,7 @@ void matrix_scan_user(void) { | |||
| 176 | run_diablo_macro_check(); | 159 | run_diablo_macro_check(); |
| 177 | #endif // TAP_DANCE_ENABLE | 160 | #endif // TAP_DANCE_ENABLE |
| 178 | 161 | ||
| 179 | #ifdef RGBLIGHT_ENABLE | 162 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
| 180 | matrix_scan_rgb(); | 163 | matrix_scan_rgb(); |
| 181 | #endif // RGBLIGHT_ENABLE | 164 | #endif // RGBLIGHT_ENABLE |
| 182 | 165 | ||
| @@ -190,7 +173,7 @@ layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } | |||
| 190 | // Then runs keymap's layer change check | 173 | // Then runs keymap's layer change check |
| 191 | layer_state_t layer_state_set_user(layer_state_t state) { | 174 | layer_state_t layer_state_set_user(layer_state_t state) { |
| 192 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); | 175 | state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); |
| 193 | #ifdef RGBLIGHT_ENABLE | 176 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
| 194 | state = layer_state_set_rgb(state); | 177 | state = layer_state_set_rgb(state); |
| 195 | #endif // RGBLIGHT_ENABLE | 178 | #endif // RGBLIGHT_ENABLE |
| 196 | return layer_state_set_keymap(state); | 179 | return layer_state_set_keymap(state); |
| @@ -203,7 +186,7 @@ layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state | |||
| 203 | layer_state_t default_layer_state_set_user(layer_state_t state) { | 186 | layer_state_t default_layer_state_set_user(layer_state_t state) { |
| 204 | state = default_layer_state_set_keymap(state); | 187 | state = default_layer_state_set_keymap(state); |
| 205 | #if 0 | 188 | #if 0 |
| 206 | # ifdef RGBLIGHT_ENABLE | 189 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
| 207 | state = default_layer_state_set_rgb(state); | 190 | state = default_layer_state_set_rgb(state); |
| 208 | # endif // RGBLIGHT_ENABLE | 191 | # endif // RGBLIGHT_ENABLE |
| 209 | #endif | 192 | #endif |
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 0d6dac380..e3edf8112 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -49,13 +49,8 @@ enum userspace_layers { | |||
| 49 | _ADJUST, | 49 | _ADJUST, |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | /* | ||
| 53 | define modifiers here, since MOD_* doesn't seem to work for these | ||
| 54 | */ | ||
| 55 | |||
| 56 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); | 52 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); |
| 57 | bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); | 53 | bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); |
| 58 | bool send_game_macro(const char *str, keyrecord_t *record, bool override); | ||
| 59 | void matrix_init_keymap(void); | 54 | void matrix_init_keymap(void); |
| 60 | void shutdown_keymap(void); | 55 | void shutdown_keymap(void); |
| 61 | void suspend_power_down_keymap(void); | 56 | void suspend_power_down_keymap(void); |
| @@ -69,11 +64,12 @@ void eeconfig_init_keymap(void); | |||
| 69 | typedef union { | 64 | typedef union { |
| 70 | uint32_t raw; | 65 | uint32_t raw; |
| 71 | struct { | 66 | struct { |
| 72 | bool rgb_layer_change :1; | 67 | bool rgb_layer_change :1; |
| 73 | bool is_overwatch :1; | 68 | bool is_overwatch :1; |
| 74 | bool nuke_switch :1; | 69 | bool nuke_switch :1; |
| 75 | uint8_t unicode_mod :4; | 70 | uint8_t unicode_mod :4; |
| 76 | bool swapped_numbers :1; | 71 | bool swapped_numbers :1; |
| 72 | bool rgb_matrix_idle_anim :1; | ||
| 77 | }; | 73 | }; |
| 78 | } userspace_config_t; | 74 | } userspace_config_t; |
| 79 | 75 | ||
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 5666d052d..6eb21d2f2 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c | |||
| @@ -21,16 +21,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 21 | #endif // KEYLOGGER_ENABLE | 21 | #endif // KEYLOGGER_ENABLE |
| 22 | 22 | ||
| 23 | switch (keycode) { | 23 | switch (keycode) { |
| 24 | case KC_QWERTY ... KC_CARPLAX: | 24 | case KC_QWERTY ... KC_WORKMAN: |
| 25 | if (record->event.pressed) { | 25 | if (record->event.pressed) { |
| 26 | set_single_persistent_default_layer(keycode - KC_QWERTY); | 26 | uint8_t mods = mod_config(get_mods()|get_oneshot_mods()); |
| 27 | if (!mods) { | ||
| 28 | set_single_persistent_default_layer(keycode - KC_QWERTY); | ||
| 29 | } else if (mods & MOD_MASK_SHIFT) { | ||
| 30 | set_single_persistent_default_layer(keycode - KC_QWERTY + 4); | ||
| 31 | } else if (mods & MOD_MASK_CTRL) { | ||
| 32 | set_single_persistent_default_layer(keycode - KC_QWERTY + 8); | ||
| 33 | } | ||
| 27 | } | 34 | } |
| 28 | break; | 35 | break; |
| 29 | 36 | ||
| 30 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader | 37 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader |
| 31 | if (!record->event.pressed) { | 38 | if (!record->event.pressed) { |
| 32 | uint8_t temp_mod = get_mods(); | 39 | uint8_t temp_mod = mod_config(get_mods()); |
| 33 | uint8_t temp_osm = get_oneshot_mods(); | 40 | uint8_t temp_osm = mod_config(get_oneshot_mods()); |
| 34 | clear_mods(); | 41 | clear_mods(); |
| 35 | clear_oneshot_mods(); | 42 | clear_oneshot_mods(); |
| 36 | send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); | 43 | send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY); |
| @@ -38,15 +45,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 38 | if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) | 45 | if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) |
| 39 | #endif | 46 | #endif |
| 40 | { | 47 | { |
| 41 | #if defined(__arm__) | 48 | send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY); |
| 42 | send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY); | ||
| 43 | #elif defined(BOOTLOADER_DFU) | ||
| 44 | send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY); | ||
| 45 | #elif defined(BOOTLOADER_HALFKAY) | ||
| 46 | send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY); | ||
| 47 | #elif defined(BOOTLOADER_CATERINA) | ||
| 48 | send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY); | ||
| 49 | #endif // bootloader options | ||
| 50 | } | 49 | } |
| 51 | if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { | 50 | if ((temp_mod | temp_osm) & MOD_MASK_CTRL) { |
| 52 | send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); | 51 | send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); |
| @@ -68,44 +67,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 68 | } | 67 | } |
| 69 | break; | 68 | break; |
| 70 | 69 | ||
| 71 | // These are a serious of gaming macros. | ||
| 72 | // Only enables for the viterbi, basically, | ||
| 73 | // to save on firmware space, since it's limited. | ||
| 74 | #ifdef MACROS_ENABLED | ||
| 75 | case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros | ||
| 76 | if (record->event.pressed) { | ||
| 77 | userspace_config.is_overwatch ^= 1; | ||
| 78 | eeconfig_update_user(userspace_config.raw); | ||
| 79 | } | ||
| 80 | # ifdef RGBLIGHT_ENABLE | ||
| 81 | userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18); | ||
| 82 | # endif // RGBLIGHT_ENABLE | ||
| 83 | break; | ||
| 84 | case KC_SALT: | ||
| 85 | return send_game_macro("Salt, salt, salt...", record, false); | ||
| 86 | case KC_MORESALT: | ||
| 87 | return send_game_macro("Please sir, can I have some more salt?!", record, false); | ||
| 88 | case KC_SALTHARD: | ||
| 89 | return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false); | ||
| 90 | case KC_GOODGAME: | ||
| 91 | return send_game_macro("Good game, everyone!", record, false); | ||
| 92 | case KC_GLHF: | ||
| 93 | return send_game_macro("Good luck, have fun!!!", record, false); | ||
| 94 | case KC_SYMM: | ||
| 95 | return send_game_macro("Left click to win!", record, false); | ||
| 96 | case KC_JUSTGAME: | ||
| 97 | return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false); | ||
| 98 | case KC_TORB: | ||
| 99 | return send_game_macro("That was positively riveting!", record, false); | ||
| 100 | case KC_AIM: | ||
| 101 | send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true); | ||
| 102 | return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false); | ||
| 103 | case KC_C9: | ||
| 104 | return send_game_macro("OMG!!! C9!!!", record, false); | ||
| 105 | case KC_GGEZ: | ||
| 106 | return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false); | ||
| 107 | #endif // MACROS_ENABLED | ||
| 108 | |||
| 109 | case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them | 70 | case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them |
| 110 | #ifdef TAP_DANCE_ENABLE | 71 | #ifdef TAP_DANCE_ENABLE |
| 111 | if (record->event.pressed) { | 72 | if (record->event.pressed) { |
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h index 8901a6f91..0ae468a04 100644 --- a/users/drashna/process_records.h +++ b/users/drashna/process_records.h | |||
| @@ -13,25 +13,10 @@ enum userspace_custom_keycodes { | |||
| 13 | KC_COLEMAK, // Sets default layer to COLEMAK | 13 | KC_COLEMAK, // Sets default layer to COLEMAK |
| 14 | KC_DVORAK, // Sets default layer to DVORAK | 14 | KC_DVORAK, // Sets default layer to DVORAK |
| 15 | KC_WORKMAN, // Sets default layer to WORKMAN | 15 | KC_WORKMAN, // Sets default layer to WORKMAN |
| 16 | KC_NORMAN, // Sets default layer to NORMAN | ||
| 17 | KC_MALTRON, // Sets default layer to MALTRON | ||
| 18 | KC_EUCALYN, // Sets default layer to EUCALYN | ||
| 19 | KC_CARPLAX, // Sets default layer to CARPLAX | ||
| 20 | KC_DIABLO_CLEAR, // Clears all Diablo Timers | 16 | KC_DIABLO_CLEAR, // Clears all Diablo Timers |
| 21 | KC_OVERWATCH, // Toggles game macro input mode (so in OW, it defaults to game chat) | ||
| 22 | KC_SALT, // See drashna.c for details | ||
| 23 | KC_MORESALT, | ||
| 24 | KC_SALTHARD, | ||
| 25 | KC_GOODGAME, | ||
| 26 | KC_SYMM, | ||
| 27 | KC_JUSTGAME, | ||
| 28 | KC_GLHF, | ||
| 29 | KC_TORB, | ||
| 30 | KC_AIM, | ||
| 31 | KC_C9, | ||
| 32 | KC_GGEZ, | ||
| 33 | KC_MAKE, // Run keyboard's customized make command | 17 | KC_MAKE, // Run keyboard's customized make command |
| 34 | KC_RGB_T, // Toggles RGB Layer Indication mode | 18 | KC_RGB_T, // Toggles RGB Layer Indication mode |
| 19 | RGB_IDL, // RGB Idling animations | ||
| 35 | KC_SECRET_1, // test1 | 20 | KC_SECRET_1, // test1 |
| 36 | KC_SECRET_2, // test2 | 21 | KC_SECRET_2, // test2 |
| 37 | KC_SECRET_3, // test3 | 22 | KC_SECRET_3, // test3 |
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 12851e261..a9af0566e 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c | |||
| @@ -5,12 +5,24 @@ | |||
| 5 | #if defined(RGBLIGHT_ENABLE) | 5 | #if defined(RGBLIGHT_ENABLE) |
| 6 | extern rgblight_config_t rgblight_config; | 6 | extern rgblight_config_t rgblight_config; |
| 7 | bool has_initialized; | 7 | bool has_initialized; |
| 8 | #endif | ||
| 9 | 8 | ||
| 10 | #ifdef RGBLIGHT_ENABLE | ||
| 11 | void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); } | 9 | void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); } |
| 12 | #endif // RGBLIGHT_ENABLE | 10 | #endif // RGBLIGHT_ENABLE |
| 13 | 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 | #endif | ||
| 20 | |||
| 21 | /* Custom indicators for modifiers. | ||
| 22 | * This allows for certain lights to be lit up, based on what mods are active, giving some visual feedback. | ||
| 23 | * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. | ||
| 24 | */ | ||
| 25 | #ifdef RGBLIGHT_ENABLE | ||
| 14 | #ifdef INDICATOR_LIGHTS | 26 | #ifdef INDICATOR_LIGHTS |
| 15 | void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { | 27 | void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { |
| 16 | if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) { | 28 | if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) { |
| @@ -77,6 +89,7 @@ void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) { | |||
| 77 | } | 89 | } |
| 78 | } | 90 | } |
| 79 | 91 | ||
| 92 | /* Function for the indicators */ | ||
| 80 | void matrix_scan_indicator(void) { | 93 | void matrix_scan_indicator(void) { |
| 81 | if (has_initialized) { | 94 | if (has_initialized) { |
| 82 | set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); | 95 | set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); |
| @@ -89,6 +102,7 @@ static rgblight_fadeout lights[RGBLED_NUM]; | |||
| 89 | 102 | ||
| 90 | __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } | 103 | __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; } |
| 91 | 104 | ||
| 105 | /* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ | ||
| 92 | bool rgblight_twinkle_is_led_used(uint8_t index) { | 106 | bool rgblight_twinkle_is_led_used(uint8_t index) { |
| 93 | switch (index) { | 107 | switch (index) { |
| 94 | # ifdef INDICATOR_LIGHTS | 108 | # ifdef INDICATOR_LIGHTS |
| @@ -130,6 +144,7 @@ bool rgblight_twinkle_is_led_used(uint8_t index) { | |||
| 130 | } | 144 | } |
| 131 | } | 145 | } |
| 132 | 146 | ||
| 147 | /* Handler for fading/twinkling effect */ | ||
| 133 | void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive | 148 | void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive |
| 134 | bool litup = false; | 149 | bool litup = false; |
| 135 | for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) { | 150 | for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) { |
| @@ -156,6 +171,9 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rg | |||
| 156 | } | 171 | } |
| 157 | } | 172 | } |
| 158 | 173 | ||
| 174 | /* Triggers a LED to fade/twinkle. | ||
| 175 | * This function handles the selection of the LED and prepres for it to be used. | ||
| 176 | */ | ||
| 159 | void start_rgb_light(void) { | 177 | void start_rgb_light(void) { |
| 160 | uint8_t indices[RGBLED_NUM]; | 178 | uint8_t indices[RGBLED_NUM]; |
| 161 | uint8_t indices_count = 0; | 179 | uint8_t indices_count = 0; |
| @@ -194,12 +212,23 @@ void start_rgb_light(void) { | |||
| 194 | rgblight_sethsv_at(light->hue, 255, light->life, light_index); | 212 | rgblight_sethsv_at(light->hue, 255, light->life, light_index); |
| 195 | } | 213 | } |
| 196 | #endif | 214 | #endif |
| 215 | #endif // RGBLIGHT_ENABLE | ||
| 197 | 216 | ||
| 198 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | 217 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { |
| 218 | uint16_t temp_keycode = keycode; | ||
| 219 | // Filter out the actual keycode from MT and LT keys. | ||
| 199 | if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { | 220 | if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { |
| 200 | keycode = keycode & 0xFF; | 221 | temp_keycode &= 0xFF; |
| 201 | } | 222 | } |
| 202 | switch (keycode) { | 223 | |
| 224 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | ||
| 225 | hypno_timer = timer_read32(); | ||
| 226 | if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { | ||
| 227 | rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); | ||
| 228 | } | ||
| 229 | #endif | ||
| 230 | |||
| 231 | switch (temp_keycode) { | ||
| 203 | #ifdef RGBLIGHT_TWINKLE | 232 | #ifdef RGBLIGHT_TWINKLE |
| 204 | case KC_A ... KC_SLASH: | 233 | case KC_A ... KC_SLASH: |
| 205 | case KC_F1 ... KC_F12: | 234 | case KC_F1 ... KC_F12: |
| @@ -210,40 +239,58 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 210 | if (record->event.pressed) { | 239 | if (record->event.pressed) { |
| 211 | start_rgb_light(); | 240 | start_rgb_light(); |
| 212 | } | 241 | } |
| 213 | return true; | ||
| 214 | break; | 242 | break; |
| 215 | #endif // RGBLIGHT_TWINKLE | 243 | #endif // RGBLIGHT_TWINKLE |
| 216 | case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal | 244 | case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal |
| 217 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | 245 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
| 218 | if (record->event.pressed) { | 246 | if (record->event.pressed) { |
| 219 | userspace_config.rgb_layer_change ^= 1; | 247 | userspace_config.rgb_layer_change ^= 1; |
| 220 | xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); | 248 | dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); |
| 221 | eeconfig_update_user(userspace_config.raw); | 249 | eeconfig_update_user(userspace_config.raw); |
| 222 | if (userspace_config.rgb_layer_change) { | 250 | if (userspace_config.rgb_layer_change) { |
| 223 | layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) | 251 | layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) |
| 224 | } | 252 | } |
| 225 | } | 253 | } |
| 226 | #endif // RGBLIGHT_ENABLE | 254 | #endif // RGBLIGHT_ENABLE |
| 227 | return false; | ||
| 228 | break; | 255 | break; |
| 229 | #ifdef RGBLIGHT_ENABLE | 256 | case RGB_IDL: // This allows me to use underglow as layer indication, or as normal |
| 257 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | ||
| 258 | if (record->event.pressed) { | ||
| 259 | userspace_config.rgb_matrix_idle_anim ^= 1; | ||
| 260 | dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); | ||
| 261 | eeconfig_update_user(userspace_config.raw); | ||
| 262 | if (userspace_config.rgb_matrix_idle_anim) { rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); } | ||
| 263 | } | ||
| 264 | #endif | ||
| 265 | break; | ||
| 230 | case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions | 266 | case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions |
| 231 | if (record->event.pressed) { // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled | 267 | if (record->event.pressed) { |
| 268 | bool is_eeprom_updated = false; | ||
| 269 | #ifdef RGBLIGHT_ENABLE | ||
| 270 | // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled | ||
| 232 | if (userspace_config.rgb_layer_change) { | 271 | if (userspace_config.rgb_layer_change) { |
| 233 | userspace_config.rgb_layer_change = false; | 272 | userspace_config.rgb_layer_change = false; |
| 234 | xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); | 273 | dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); |
| 235 | eeconfig_update_user(userspace_config.raw); | 274 | is_eeprom_updated = true; |
| 236 | } | 275 | } |
| 276 | #endif | ||
| 277 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | ||
| 278 | if (userspace_config.rgb_matrix_idle_anim) { | ||
| 279 | userspace_config.rgb_matrix_idle_anim = false; | ||
| 280 | dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); | ||
| 281 | is_eeprom_updated = true; | ||
| 282 | } | ||
| 283 | #endif | ||
| 284 | if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); } | ||
| 237 | } | 285 | } |
| 238 | return true; | ||
| 239 | break; | 286 | break; |
| 240 | #endif // RGBLIGHT_ENABLE | ||
| 241 | } | 287 | } |
| 242 | return true; | 288 | return true; |
| 243 | } | 289 | } |
| 244 | 290 | ||
| 245 | void keyboard_post_init_rgb(void) { | 291 | void keyboard_post_init_rgb(void) { |
| 246 | #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION) | 292 | #if defined(RGBLIGHT_ENABLE) |
| 293 | # if defined(RGBLIGHT_STARTUP_ANIMATION) | ||
| 247 | bool is_enabled = rgblight_config.enable; | 294 | bool is_enabled = rgblight_config.enable; |
| 248 | if (userspace_config.rgb_layer_change) { | 295 | if (userspace_config.rgb_layer_change) { |
| 249 | rgblight_enable_noeeprom(); | 296 | rgblight_enable_noeeprom(); |
| @@ -262,17 +309,31 @@ void keyboard_post_init_rgb(void) { | |||
| 262 | rgblight_disable_noeeprom(); | 309 | rgblight_disable_noeeprom(); |
| 263 | } | 310 | } |
| 264 | 311 | ||
| 265 | #endif | 312 | # endif |
| 266 | layer_state_set_user(layer_state); | 313 | layer_state_set_user(layer_state); |
| 314 | #endif | ||
| 315 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | ||
| 316 | if (userspace_config.rgb_matrix_idle_anim) { | ||
| 317 | rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); | ||
| 318 | } | ||
| 319 | #endif | ||
| 267 | } | 320 | } |
| 268 | 321 | ||
| 269 | void matrix_scan_rgb(void) { | 322 | void matrix_scan_rgb(void) { |
| 270 | #ifdef RGBLIGHT_TWINKLE | 323 | #ifdef RGBLIGHT_ENABLE |
| 324 | # ifdef RGBLIGHT_TWINKLE | ||
| 271 | scan_rgblight_fadeout(); | 325 | scan_rgblight_fadeout(); |
| 272 | #endif // RGBLIGHT_ENABLE | 326 | # endif // RGBLIGHT_ENABLE |
| 273 | 327 | ||
| 274 | #ifdef INDICATOR_LIGHTS | 328 | # ifdef INDICATOR_LIGHTS |
| 275 | matrix_scan_indicator(); | 329 | matrix_scan_indicator(); |
| 330 | # endif | ||
| 331 | #endif | ||
| 332 | |||
| 333 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | ||
| 334 | if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) { | ||
| 335 | rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); | ||
| 336 | } | ||
| 276 | #endif | 337 | #endif |
| 277 | } | 338 | } |
| 278 | 339 | ||
diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index ce45d6a00..7e34c93c1 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h | |||
| @@ -4,20 +4,29 @@ | |||
| 4 | # include "rgb_matrix.h" | 4 | # include "rgb_matrix.h" |
| 5 | #endif | 5 | #endif |
| 6 | 6 | ||
| 7 | #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) | ||
| 7 | typedef struct { | 8 | typedef struct { |
| 8 | bool enabled; | 9 | bool enabled; |
| 9 | uint8_t hue; | 10 | uint8_t hue; |
| 10 | uint16_t timer; | 11 | uint16_t timer; |
| 11 | uint8_t life; | 12 | uint8_t life; |
| 12 | } rgblight_fadeout; | 13 | } rgblight_fadeout; |
| 14 | #endif | ||
| 13 | 15 | ||
| 14 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); | 16 | bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record); |
| 15 | void scan_rgblight_fadeout(void); | ||
| 16 | void keyboard_post_init_rgb(void); | 17 | void keyboard_post_init_rgb(void); |
| 17 | void matrix_scan_rgb(void); | 18 | void matrix_scan_rgb(void); |
| 18 | layer_state_t layer_state_set_rgb(layer_state_t state); | 19 | layer_state_t layer_state_set_rgb(layer_state_t state); |
| 19 | layer_state_t default_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) | ||
| 20 | void rgblight_sethsv_default_helper(uint8_t index); | 26 | void rgblight_sethsv_default_helper(uint8_t index); |
| 21 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); | 27 | #endif |
| 22 | 28 | ||
| 29 | #ifdef RGB_MATRIX_ENABLE | ||
| 30 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); | ||
| 23 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); | 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/drashna/rules.mk b/users/drashna/rules.mk index b414036a4..7b77a51d9 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk | |||
| @@ -40,10 +40,6 @@ ifneq ($(strip $(RGB_MATRIX_ENABLE)), no) | |||
| 40 | endif | 40 | endif |
| 41 | 41 | ||
| 42 | 42 | ||
| 43 | ifeq ($(strip $(MACROS_ENABLED)), yes) | ||
| 44 | OPT_DEFS += -DMACROS_ENABLED | ||
| 45 | endif | ||
| 46 | |||
| 47 | ifdef CONSOLE_ENABLE | 43 | ifdef CONSOLE_ENABLE |
| 48 | ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) | 44 | ifeq ($(strip $(KEYLOGGER_ENABLE)), yes) |
| 49 | OPT_DEFS += -DKEYLOGGER_ENABLE | 45 | OPT_DEFS += -DKEYLOGGER_ENABLE |
diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index a87247071..d22e2959c 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h | |||
| @@ -174,11 +174,11 @@ NOTE: These are all the same length. If you do a search/replace | |||
| 174 | 174 | ||
| 175 | 175 | ||
| 176 | #define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG | 176 | #define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG |
| 177 | #define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM | 177 | #define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM |
| 178 | #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T | 178 | #define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T |
| 179 | 179 | ||
| 180 | #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 | 180 | #define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 |
| 181 | #define _________________ADJUST_R2_________________ AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN | 181 | #define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN |
| 182 | #define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT | 182 | #define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT |
| 183 | 183 | ||
| 184 | // clang-format on | 184 | // clang-format on |
