diff options
38 files changed, 1499 insertions, 592 deletions
diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c index 6c5b97457..668178967 100644 --- a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c +++ b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c | |||
| @@ -1,12 +1,11 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | #include "drashna.h" | 1 | #include "drashna.h" |
| 3 | #include "analog.c" | 2 | #include "analog.c" |
| 4 | #include "pointing_device.h" | 3 | #include "pointing_device.h" |
| 5 | #include "pincontrol.h" | 4 | #include "pincontrol.h" |
| 6 | 5 | ||
| 7 | |||
| 8 | #define KC_X0 LT(_FN, KC_ESC) | 6 | #define KC_X0 LT(_FN, KC_ESC) |
| 9 | 7 | ||
| 8 | // clang-format off | ||
| 10 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 9 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 11 | [_QWERTY] = LAYOUT( | 10 | [_QWERTY] = LAYOUT( |
| 12 | KC_VOLU, KC_MPLY, KC_MPRV, RESET, | 11 | KC_VOLU, KC_MPLY, KC_MPRV, RESET, |
| @@ -14,6 +13,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 14 | ), | 13 | ), |
| 15 | 14 | ||
| 16 | }; | 15 | }; |
| 16 | // clang-format on | ||
| 17 | 17 | ||
| 18 | // Joystick | 18 | // Joystick |
| 19 | // Set Pins | 19 | // Set Pins |
| @@ -39,7 +39,7 @@ int16_t xOrigin, yOrigin; | |||
| 39 | uint16_t lastCursor = 0; | 39 | uint16_t lastCursor = 0; |
| 40 | 40 | ||
| 41 | int16_t axisCoordinate(uint8_t pin, uint16_t origin) { | 41 | int16_t axisCoordinate(uint8_t pin, uint16_t origin) { |
| 42 | int8_t direction; | 42 | int8_t direction; |
| 43 | int16_t distanceFromOrigin; | 43 | int16_t distanceFromOrigin; |
| 44 | int16_t range; | 44 | int16_t range; |
| 45 | 45 | ||
| @@ -57,8 +57,8 @@ int16_t axisCoordinate(uint8_t pin, uint16_t origin) { | |||
| 57 | direction = 1; | 57 | direction = 1; |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | float percent = (float)distanceFromOrigin / range; | 60 | float percent = (float)distanceFromOrigin / range; |
| 61 | int16_t coordinate = (int16_t)(percent * 100); | 61 | int16_t coordinate = (int16_t)(percent * 100); |
| 62 | if (coordinate < 0) { | 62 | if (coordinate < 0) { |
| 63 | return 0; | 63 | return 0; |
| 64 | } else if (coordinate > 100) { | 64 | } else if (coordinate > 100) { |
diff --git a/keyboards/c39/keymaps/drashna/config.h b/keyboards/c39/keymaps/drashna/config.h index 361f68a78..5d53fe54b 100755..100644 --- a/keyboards/c39/keymaps/drashna/config.h +++ b/keyboards/c39/keymaps/drashna/config.h | |||
| @@ -2,6 +2,11 @@ | |||
| 2 | 2 | ||
| 3 | // place overrides here | 3 | // place overrides here |
| 4 | #undef MATRIX_COL_PINS | 4 | #undef MATRIX_COL_PINS |
| 5 | #define MATRIX_COL_PINS { A3, A2, A1, A0, B13, B14, B15, B9, B3, B2, B4, A10, A9 } | 5 | #define MATRIX_COL_PINS \ |
| 6 | { A3, A2, A1, A0, B13, B14, B15, B9, B3, B2, B4, A10, A9 } | ||
| 6 | #undef MATRIX_ROW_PINS | 7 | #undef MATRIX_ROW_PINS |
| 7 | #define MATRIX_ROW_PINS { B7, B1, B0 } | 8 | #define MATRIX_ROW_PINS \ |
| 9 | { B7, B1, B0 } | ||
| 10 | |||
| 11 | #define RGB_DI_PIN B10 | ||
| 12 | #define RGBLED_NUM 15 | ||
diff --git a/keyboards/c39/keymaps/drashna/keymap.c b/keyboards/c39/keymaps/drashna/keymap.c index 9de75190d..882938138 100755 --- a/keyboards/c39/keymaps/drashna/keymap.c +++ b/keyboards/c39/keymaps/drashna/keymap.c | |||
| @@ -1,45 +1,97 @@ | |||
| 1 | #include QMK_KEYBOARD_H | 1 | #include "drashna.h" |
| 2 | 2 | ||
| 3 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | 3 | /* |
| 4 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | 4 | * The `LAYOUT_base` macro is a template to allow the use of identical |
| 5 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | 5 | * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so |
| 6 | // entirely and just use numbers. | 6 | * that there is no need to set them up for each layout, and modify all of |
| 7 | #define _QWERTY 0 | 7 | * them if I want to change them. This helps to keep consistency and ease |
| 8 | #define _FN1 1 | 8 | * of use. K## is a placeholder to pass through the individual keycodes |
| 9 | 9 | */ | |
| 10 | // Defines for task manager and such | 10 | // clang-format off |
| 11 | #define CALTDEL LCTL(LALT(KC_DEL)) | 11 | #define LAYOUT_base( \ |
| 12 | #define TSKMGR LCTL(LSFT(KC_ESC)) | 12 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ |
| 13 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ | ||
| 14 | K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ | ||
| 15 | ) \ | ||
| 16 | LAYOUT_wrapper( \ | ||
| 17 | KC_ESC, K01, K02, K03, K04, K05, KC_NO, K06, K07, K08, K09, K0A, KC_DEL, \ | ||
| 18 | ALT_T(KC_TAB), K11, K12, K13, K14, K15, KC_BSPC, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ | ||
| 19 | KC_MLSF, CTL_T(K21), K22, K23, K24, LT(_LOWER,K25), KC_SPC, LT(_RAISE,K26), K27, K28, K29, RCTL_T(K2A), KC_ENT \ | ||
| 20 | ) | ||
| 21 | #define LAYOUT_base_wrapper(...) LAYOUT_base(__VA_ARGS__) | ||
| 13 | 22 | ||
| 14 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 15 | 24 | ||
| 16 | /* Qwerty | 25 | [_QWERTY] = LAYOUT_base_wrapper( |
| 17 | * ,----------------------------------------------------------------------------. ,-------------. | 26 | _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, |
| 18 | * | Q | W | E | R | T | Bksp | Y | U | I | O | P | | M1 | M2 | | 27 | _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, |
| 19 | * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| | 28 | _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ |
| 20 | * | A | S | D | F | G | Enter| H | J | K | L | ; | | M3 | M4 | | 29 | ), |
| 21 | * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| | 30 | |
| 22 | * | Z | X | C | V | B | FN1 | N | M | , | . | / | | M5 | M6 | | 31 | [_COLEMAK] = LAYOUT_base_wrapper( |
| 23 | * `----------------------------------------------------------------------------' `-------------' | 32 | _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, |
| 24 | */ | 33 | _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, |
| 25 | [_QWERTY] = LAYOUT( | 34 | _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ |
| 26 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_1, KC_2, | 35 | ), |
| 27 | KC_A, KC_S, KC_D, KC_F, KC_G, MT(MOD_LSFT, KC_ENT), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_3, KC_4, | 36 | |
| 28 | KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_FN1, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_5, KC_6 | 37 | [_DVORAK] = LAYOUT_base_wrapper( |
| 29 | ), | 38 | _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, |
| 30 | 39 | _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, | |
| 31 | /* FN1 | 40 | _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ |
| 32 | * ,----------------------------------------------------------------------------. ,-------------. | 41 | ), |
| 33 | * | 1 | 2 | 3 | 4 | 5 | Bksp | 6 | 7 | 8 | 9 | 0 | | M1 | M2 | | 42 | |
| 34 | * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| | 43 | [_WORKMAN] = LAYOUT_base_wrapper( |
| 35 | * | 4 | 5 | 6 | + | | Enter| | | | | | | M3 | M4 | | 44 | _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, |
| 36 | * |------+------+------+------+------+------+------+------+------+------+------+ |------+------| | 45 | _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, |
| 37 | * | 7 | 8 | 9 | 0 | | FN1 | | | | | | | M5 | M6 | | 46 | _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ |
| 38 | * `----------------------------------------------------------------------------' `-------------' | 47 | ), |
| 39 | */ | 48 | |
| 40 | [_FN1] = LAYOUT( | 49 | [_NORMAN] = LAYOUT_base_wrapper( |
| 41 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_1, KC_2, | 50 | _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, |
| 42 | KC_4, KC_5, KC_6, KC_PLUS, _______, KC_ENT, _______, _______, _______, _______, _______, KC_3, KC_4, | 51 | _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, |
| 43 | KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_5, KC_6 | 52 | _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ |
| 44 | ), | 53 | ), |
| 54 | |||
| 55 | [_MALTRON] = LAYOUT_base_wrapper( | ||
| 56 | _________________MALTRON_L1________________, _________________MALTRON_R1________________, | ||
| 57 | _________________MALTRON_L2________________, _________________MALTRON_R2________________, | ||
| 58 | _________________MALTRON_L3________________, _________________MALTRON_R3________________ | ||
| 59 | ), | ||
| 60 | |||
| 61 | [_EUCALYN] = LAYOUT_base_wrapper( | ||
| 62 | _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, | ||
| 63 | _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, | ||
| 64 | _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ | ||
| 65 | ), | ||
| 66 | |||
| 67 | [_CARPLAX] = LAYOUT_base_wrapper( | ||
| 68 | _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, | ||
| 69 | _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, | ||
| 70 | _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ | ||
| 71 | ), | ||
| 72 | |||
| 73 | [_MODS] = LAYOUT_wrapper( | ||
| 74 | _______, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______, | ||
| 75 | _______, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______, | ||
| 76 | KC_LSFT, ___________________BLANK___________________, _______, ___________________BLANK___________________, _______ | ||
| 77 | ), | ||
| 78 | |||
| 79 | [_LOWER] = LAYOUT_wrapper( | ||
| 80 | KC_TILD, _________________LOWER_L1__________________, _______, _________________LOWER_R1__________________, KC_BSPC, | ||
| 81 | KC_DEL, _________________LOWER_L2__________________, _______, _________________LOWER_R2__________________, KC_PIPE, | ||
| 82 | _______, _________________LOWER_L3__________________, _______, _________________LOWER_R3__________________, _______ | ||
| 83 | ), | ||
| 84 | |||
| 85 | [_RAISE] = LAYOUT_wrapper( | ||
| 86 | KC_GRV, _________________RAISE_L1__________________, _______, _________________RAISE_R1__________________, KC_BSPC, | ||
| 87 | KC_DEL, _________________RAISE_L2__________________, _______, _________________RAISE_R2__________________, KC_BSLS, | ||
| 88 | _______, _________________RAISE_L3__________________, _______, _________________RAISE_R3__________________, _______ | ||
| 89 | ), | ||
| 90 | |||
| 91 | [_ADJUST] = LAYOUT_wrapper( | ||
| 92 | KC_MAKE, _________________ADJUST_L1_________________, KC_NUKE, _________________ADJUST_R1_________________, KC_RST, | ||
| 93 | VRSN, _________________ADJUST_L2_________________, MG_NKRO, _________________ADJUST_R2_________________, EEP_RST, | ||
| 94 | TG_MODS, _________________ADJUST_L3_________________, KC_RGB_T,_________________ADJUST_R3_________________, RGB_IDL | ||
| 95 | ) | ||
| 45 | }; | 96 | }; |
| 97 | // clang-format on | ||
diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk index ae0cc9efe..d216f6abe 100644 --- a/keyboards/c39/keymaps/drashna/rules.mk +++ b/keyboards/c39/keymaps/drashna/rules.mk | |||
| @@ -15,4 +15,6 @@ MIDI_ENABLE = no # MIDI controls | |||
| 15 | UNICODE_ENABLE = yes # Unicode | 15 | UNICODE_ENABLE = yes # Unicode |
| 16 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 16 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
| 17 | AUDIO_ENABLE = yes # Audio output on port C6 | 17 | AUDIO_ENABLE = yes # Audio output on port C6 |
| 18 | RGBLIGHT_ENABLE = no # RGB Enable / Disable | 18 | RGBLIGHT_ENABLE = yes # RGB Enable / Disable |
| 19 | |||
| 20 | RGBLIGHT_STARTUP_ANIMATION = yes | ||
diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/keyboards/crkbd/keymaps/drashna/glcdfont.c index 998b5c408..2bfc3fac6 100644 --- a/keyboards/crkbd/keymaps/drashna/glcdfont.c +++ b/keyboards/crkbd/keymaps/drashna/glcdfont.c | |||
| @@ -1,17 +1,18 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #ifdef __AVR__ | 3 | #ifdef __AVR__ |
| 4 | #include <avr/io.h> | 4 | # include <avr/io.h> |
| 5 | #include <avr/pgmspace.h> | 5 | # include <avr/pgmspace.h> |
| 6 | #elif defined(ESP8266) | 6 | #elif defined(ESP8266) |
| 7 | #include <pgmspace.h> | 7 | # include <pgmspace.h> |
| 8 | #else | 8 | #else |
| 9 | #define PROGMEM | 9 | # define PROGMEM |
| 10 | #endif | 10 | #endif |
| 11 | 11 | ||
| 12 | // Corne 8x6 font with QMK Firmware Logo | 12 | // Corne 8x6 font with QMK Firmware Logo |
| 13 | // Online editor: https://helixfonteditor.netlify.com/ | 13 | // Online editor: https://helixfonteditor.netlify.com/ |
| 14 | 14 | ||
| 15 | // clang-format off | ||
| 15 | const unsigned char font[] PROGMEM = { | 16 | const unsigned char font[] PROGMEM = { |
| 16 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 17 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 17 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, | 18 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, |
diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index cd84f0d91..9a1beeb74 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c | |||
| @@ -1,17 +1,17 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | #include "drashna.h" | 1 | #include "drashna.h" |
| 3 | 2 | ||
| 4 | extern keymap_config_t keymap_config; | 3 | extern uint8_t is_master; |
| 5 | extern uint8_t is_master; | ||
| 6 | 4 | ||
| 7 | #ifdef RGBLIGHT_ENABLE | 5 | #ifdef RGBLIGHT_ENABLE |
| 8 | // Following line allows macro to read current RGB settings | 6 | // Following line allows macro to read current RGB settings |
| 9 | extern rgblight_config_t rgblight_config; | 7 | extern rgblight_config_t rgblight_config; |
| 10 | #endif | 8 | #endif |
| 11 | #ifdef OLED_DRIVER_ENABLE | 9 | #ifdef OLED_DRIVER_ENABLE |
| 12 | static uint32_t oled_timer = 0; | 10 | # define KEYLOGGER_LENGTH 5 |
| 13 | static char keylog_str[6] = {}; | 11 | static uint32_t oled_timer = 0; |
| 14 | static uint16_t log_timer = 0; | 12 | static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; |
| 13 | static uint16_t log_timer = 0; | ||
| 14 | // clang-format off | ||
| 15 | static const char PROGMEM code_to_name[0xFF] = { | 15 | static const char PROGMEM code_to_name[0xFF] = { |
| 16 | // 0 1 2 3 4 5 6 7 8 9 A B c D E F | 16 | // 0 1 2 3 4 5 6 7 8 9 A B c D E F |
| 17 | ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x | 17 | ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x |
| @@ -37,7 +37,14 @@ void add_keylog(uint16_t keycode); | |||
| 37 | 37 | ||
| 38 | enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; | 38 | enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; |
| 39 | 39 | ||
| 40 | // clang-format off | 40 | /* |
| 41 | * The `LAYOUT_crkbd_base` macro is a template to allow the use of identical | ||
| 42 | * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so | ||
| 43 | * that there is no need to set them up for each layout, and modify all of | ||
| 44 | * them if I want to change them. This helps to keep consistency and ease | ||
| 45 | * of use. K## is a placeholder to pass through the individual keycodes | ||
| 46 | */ | ||
| 47 | |||
| 41 | #define LAYOUT_crkbd_base( \ | 48 | #define LAYOUT_crkbd_base( \ |
| 42 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | 49 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ |
| 43 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ | 50 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ |
| @@ -155,7 +162,7 @@ void add_keylog(uint16_t keycode) { | |||
| 155 | keycode = 0; | 162 | keycode = 0; |
| 156 | } | 163 | } |
| 157 | 164 | ||
| 158 | for (uint8_t i = 4; i > 0; --i) { | 165 | for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { |
| 159 | keylog_str[i] = keylog_str[i - 1]; | 166 | keylog_str[i] = keylog_str[i - 1]; |
| 160 | } | 167 | } |
| 161 | 168 | ||
| @@ -168,7 +175,7 @@ void add_keylog(uint16_t keycode) { | |||
| 168 | 175 | ||
| 169 | void update_log(void) { | 176 | void update_log(void) { |
| 170 | if (timer_elapsed(log_timer) > 750) { | 177 | if (timer_elapsed(log_timer) > 750) { |
| 171 | //add_keylog(0); | 178 | // add_keylog(0); |
| 172 | } | 179 | } |
| 173 | } | 180 | } |
| 174 | 181 | ||
| @@ -179,7 +186,7 @@ void render_keylogger_status(void) { | |||
| 179 | 186 | ||
| 180 | void render_default_layer_state(void) { | 187 | void render_default_layer_state(void) { |
| 181 | oled_write_P(PSTR("Lyout"), false); | 188 | oled_write_P(PSTR("Lyout"), false); |
| 182 | switch (biton32(default_layer_state)) { | 189 | switch (get_highest_layer(default_layer_state)) { |
| 183 | case _QWERTY: | 190 | case _QWERTY: |
| 184 | oled_write_P(PSTR(" QRTY"), false); | 191 | oled_write_P(PSTR(" QRTY"), false); |
| 185 | break; | 192 | break; |
| @@ -268,7 +275,7 @@ void render_status_secondary(void) { | |||
| 268 | /* Show Keyboard Layout */ | 275 | /* Show Keyboard Layout */ |
| 269 | render_default_layer_state(); | 276 | render_default_layer_state(); |
| 270 | render_layer_state(); | 277 | render_layer_state(); |
| 271 | render_mod_status(get_mods()|get_oneshot_mods()); | 278 | render_mod_status(get_mods() | get_oneshot_mods()); |
| 272 | 279 | ||
| 273 | render_keylogger_status(); | 280 | render_keylogger_status(); |
| 274 | } | 281 | } |
| @@ -278,9 +285,11 @@ void oled_task_user(void) { | |||
| 278 | oled_off(); | 285 | oled_off(); |
| 279 | return; | 286 | return; |
| 280 | } | 287 | } |
| 281 | #ifndef SPLIT_KEYBOARD | 288 | # ifndef SPLIT_KEYBOARD |
| 282 | else { oled_on(); } | 289 | else { |
| 283 | #endif | 290 | oled_on(); |
| 291 | } | ||
| 292 | # endif | ||
| 284 | 293 | ||
| 285 | update_log(); | 294 | update_log(); |
| 286 | if (is_master) { | 295 | if (is_master) { |
| @@ -303,16 +312,12 @@ uint16_t get_tapping_term(uint16_t keycode) { | |||
| 303 | 312 | ||
| 304 | #ifdef RGB_MATRIX_ENABLE | 313 | #ifdef RGB_MATRIX_ENABLE |
| 305 | 314 | ||
| 306 | void suspend_power_down_keymap(void) { | 315 | void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } |
| 307 | rgb_matrix_set_suspend_state(true); | ||
| 308 | } | ||
| 309 | 316 | ||
| 310 | void suspend_wakeup_init_keymap(void) { | 317 | void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } |
| 311 | rgb_matrix_set_suspend_state(false); | ||
| 312 | } | ||
| 313 | 318 | ||
| 314 | void check_default_layer(uint8_t mode, uint8_t type) { | 319 | void check_default_layer(uint8_t mode, uint8_t type) { |
| 315 | switch (biton32(default_layer_state)) { | 320 | switch (get_highest_layer(default_layer_state)) { |
| 316 | case _QWERTY: | 321 | case _QWERTY: |
| 317 | rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); | 322 | rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type); |
| 318 | break; | 323 | break; |
| @@ -351,7 +356,7 @@ void rgb_matrix_indicators_user(void) { | |||
| 351 | rgb_matrix_config.enable | 356 | rgb_matrix_config.enable |
| 352 | # endif | 357 | # endif |
| 353 | ) { | 358 | ) { |
| 354 | switch (biton32(layer_state)) { | 359 | switch (get_highest_layer(layer_state)) { |
| 355 | case _GAMEPAD: | 360 | case _GAMEPAD: |
| 356 | rgb_matrix_layer_helper(HSV_ORANGE, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); | 361 | rgb_matrix_layer_helper(HSV_ORANGE, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW); |
| 357 | break; | 362 | break; |
diff --git a/keyboards/gergo/keymaps/drashna/keymap.c b/keyboards/gergo/keymaps/drashna/keymap.c index edc5a9e99..d1e622406 100644 --- a/keyboards/gergo/keymaps/drashna/keymap.c +++ b/keyboards/gergo/keymaps/drashna/keymap.c | |||
| @@ -1,14 +1,12 @@ | |||
| 1 | /* Good on you for modifying your layout! if you don't have | ||
| 2 | * time to read the QMK docs, a list of keycodes can be found at | ||
| 3 | * | ||
| 4 | * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md | ||
| 5 | * | ||
| 6 | * There's also a template for adding new layers at the bottom of this file! | ||
| 7 | */ | ||
| 8 | |||
| 9 | #include QMK_KEYBOARD_H | ||
| 10 | #include "drashna.h" | 1 | #include "drashna.h" |
| 11 | 2 | ||
| 3 | /* | ||
| 4 | * The `LAYOUT_gergo_base` macro is a template to allow the use of identical | ||
| 5 | * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so | ||
| 6 | * that there is no need to set them up for each layout, and modify all of | ||
| 7 | * them if I want to change them. This helps to keep consistency and ease | ||
| 8 | * of use. K## is a placeholder to pass through the individual keycodes | ||
| 9 | */ | ||
| 12 | // clang-format off | 10 | // clang-format off |
| 13 | #define LAYOUT_gergo_base( \ | 11 | #define LAYOUT_gergo_base( \ |
| 14 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | 12 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ |
| @@ -17,7 +15,7 @@ | |||
| 17 | ) \ | 15 | ) \ |
| 18 | LAYOUT_gergo_wrapper( \ | 16 | LAYOUT_gergo_wrapper( \ |
| 19 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \ | 17 | 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, RALT_T(KC_QUOT), \ | 18 | LALT_T(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, \ | 19 | 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, _______ \ | 20 | KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \ |
| 23 | ) | 21 | ) |
diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h index 6fff5d72c..25678bd67 100644 --- a/keyboards/keebio/iris/keymaps/drashna/config.h +++ b/keyboards/keebio/iris/keymaps/drashna/config.h | |||
| @@ -32,7 +32,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 32 | # undef RGBLED_NUM | 32 | # undef RGBLED_NUM |
| 33 | # define RGBLED_NUM 18 // Number of LEDs | 33 | # define RGBLED_NUM 18 // Number of LEDs |
| 34 | # undef RGBLED_SPLIT | 34 | # undef RGBLED_SPLIT |
| 35 | # define RGBLED_SPLIT { 9, 9 } | 35 | # define RGBLED_SPLIT \ |
| 36 | { 9, 9 } | ||
| 36 | # define RGBLIGHT_HUE_STEP 8 | 37 | # define RGBLIGHT_HUE_STEP 8 |
| 37 | # define RGBLIGHT_SAT_STEP 8 | 38 | # define RGBLIGHT_SAT_STEP 8 |
| 38 | # define RGBLIGHT_VAL_STEP 8 | 39 | # define RGBLIGHT_VAL_STEP 8 |
diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index de19f7ca0..edfcd23e7 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c | |||
| @@ -1,7 +1,13 @@ | |||
| 1 | |||
| 2 | #include QMK_KEYBOARD_H | ||
| 3 | #include "drashna.h" | 1 | #include "drashna.h" |
| 4 | 2 | ||
| 3 | /* | ||
| 4 | * The `LAYOUT_iris_base` macro is a template to allow the use of identical | ||
| 5 | * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so | ||
| 6 | * that there is no need to set them up for each layout, and modify all of | ||
| 7 | * them if I want to change them. This helps to keep consistency and ease | ||
| 8 | * of use. K## is a placeholder to pass through the individual keycodes | ||
| 9 | */ | ||
| 10 | |||
| 5 | // clang-format off | 11 | // clang-format off |
| 6 | #define LAYOUT_iris_base( \ | 12 | #define LAYOUT_iris_base( \ |
| 7 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | 13 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ |
| @@ -10,8 +16,8 @@ | |||
| 10 | ) \ | 16 | ) \ |
| 11 | LAYOUT_wrapper( \ | 17 | LAYOUT_wrapper( \ |
| 12 | KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ | 18 | KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \ |
| 13 | KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ | 19 | LALT_T(KC_TAB), K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \ |
| 14 | KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ | 20 | KC_C1R3, 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, \ | 21 | 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 \ | 22 | KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ |
| 17 | ) | 23 | ) |
diff --git a/keyboards/keebio/viterbi/keymaps/drashna/config.h b/keyboards/keebio/viterbi/keymaps/drashna/config.h index 201c02e41..40a5bbd0e 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/config.h +++ b/keyboards/keebio/viterbi/keymaps/drashna/config.h | |||
| @@ -21,27 +21,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 21 | #define MATRIX_ROWS 5 | 21 | #define MATRIX_ROWS 5 |
| 22 | 22 | ||
| 23 | #ifdef RGBLIGHT_ENABLE | 23 | #ifdef RGBLIGHT_ENABLE |
| 24 | # undef RGBLED_NUM | 24 | # undef RGBLED_NUM |
| 25 | # define RGBLED_NUM 16 | 25 | # define RGBLED_NUM 16 |
| 26 | |||
| 27 | # define RGBLIGHT_HUE_STEP 8 | ||
| 28 | # define RGBLIGHT_SAT_STEP 8 | ||
| 29 | # define RGBLIGHT_VAL_STEP 8 | ||
| 30 | # define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 | ||
| 31 | # define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 | ||
| 32 | #endif // RGBLIGHT_ENABLE | ||
| 33 | |||
| 34 | |||
| 35 | 26 | ||
| 27 | # define RGBLIGHT_HUE_STEP 8 | ||
| 28 | # define RGBLIGHT_SAT_STEP 8 | ||
| 29 | # define RGBLIGHT_VAL_STEP 8 | ||
| 30 | # define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 | ||
| 31 | # define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 | ||
| 32 | #endif // RGBLIGHT_ENABLE | ||
| 36 | 33 | ||
| 37 | #undef PRODUCT | 34 | #undef PRODUCT |
| 38 | #define PRODUCT Drashnas Viterbi Macro Pad | 35 | #define PRODUCT Drashnas Viterbi Macro Pad |
| 39 | 36 | ||
| 40 | #ifdef AUDIO_ENABLE | 37 | #ifdef AUDIO_ENABLE |
| 41 | # define C6_AUDIO | 38 | # define C6_AUDIO |
| 42 | # define NO_MUSIC_MODE | 39 | # define NO_MUSIC_MODE |
| 43 | #endif | 40 | #endif |
| 44 | 41 | ||
| 42 | // clang-format off | ||
| 45 | #define LAYOUT_ortho_5x7( \ | 43 | #define LAYOUT_ortho_5x7( \ |
| 46 | L00, L01, L02, L03, L04, L05, L06, \ | 44 | L00, L01, L02, L03, L04, L05, L06, \ |
| 47 | L10, L11, L12, L13, L14, L15, L16, \ | 45 | L10, L11, L12, L13, L14, L15, L16, \ |
| @@ -56,8 +54,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 56 | { L30, L31, L32, L33, L34, L35, L36 }, \ | 54 | { L30, L31, L32, L33, L34, L35, L36 }, \ |
| 57 | { L40, L41, L42, L43, L44, L45, L46 }, \ | 55 | { L40, L41, L42, L43, L44, L45, L46 }, \ |
| 58 | } | 56 | } |
| 57 | // clang-format on | ||
| 59 | 58 | ||
| 60 | #define QMK_ESC_OUTPUT F5 // usually COL | 59 | #define QMK_ESC_OUTPUT F5 // usually COL |
| 61 | #define QMK_ESC_INPUT D4 // usually ROW | 60 | #define QMK_ESC_INPUT D4 // usually ROW |
| 62 | #define QMK_LED B0 | 61 | #define QMK_LED B0 |
| 63 | #define QMK_SPEAKER C6 | 62 | #define QMK_SPEAKER C6 |
diff --git a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c index 9c17c5a57..3b213418d 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c | |||
| @@ -1,24 +1,15 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | #include "drashna.h" | 1 | #include "drashna.h" |
| 3 | 2 | ||
| 4 | extern keymap_config_t keymap_config; | ||
| 5 | |||
| 6 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 7 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 8 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 9 | // entirely and just use numbers. | ||
| 10 | |||
| 11 | |||
| 12 | // Fillers to make layering more clear | 3 | // Fillers to make layering more clear |
| 13 | #define DIABLO TG(_DIABLO) | 4 | #define DIABLO TG(_DIABLO) |
| 14 | #define GAMEPAD TG(_GAMEPAD) | 5 | #define GAMEPAD TG(_GAMEPAD) |
| 15 | #define MEDIA TT(_MEDIA) | 6 | #define MEDIA TT(_MEDIA) |
| 16 | 7 | ||
| 17 | 8 | // enum more_custom_keycodes { | |
| 18 | //enum more_custom_keycodes { | ||
| 19 | // KC_P00 = NEW_SAFE_RANGE | 9 | // KC_P00 = NEW_SAFE_RANGE |
| 20 | //}; | 10 | //}; |
| 21 | 11 | ||
| 12 | // clang-format off | ||
| 22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 13 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 23 | 14 | ||
| 24 | [_NUMLOCK] = LAYOUT_ortho_5x7( | 15 | [_NUMLOCK] = LAYOUT_ortho_5x7( |
| @@ -55,32 +46,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 55 | 46 | ||
| 56 | 47 | ||
| 57 | }; | 48 | }; |
| 58 | 49 | // clang-format on | |
| 59 | |||
| 60 | 50 | ||
| 61 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | 51 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { |
| 62 | 52 | // switch (keycode) { | |
| 63 | //switch (keycode) { | 53 | // case KC_P00: |
| 64 | //case KC_P00: | 54 | // if (!record->event.pressed) { |
| 65 | // if (!record->event.pressed) { | 55 | // tap(KC_KP_0); |
| 66 | // tap(KC_KP_0); | 56 | // tap(KC_KP_0); |
| 67 | // tap(KC_KP_0); | 57 | // } |
| 68 | // } | 58 | // return false; |
| 69 | // return false; | 59 | // break; |
| 70 | // break; | 60 | //} |
| 71 | //} | 61 | return true; |
| 72 | return true; | ||
| 73 | } | 62 | } |
| 74 | 63 | ||
| 75 | |||
| 76 | |||
| 77 | |||
| 78 | void matrix_init_keymap(void) { | 64 | void matrix_init_keymap(void) { |
| 79 | #ifndef CONVERT_TO_PROTON_C | 65 | #ifndef CONVERT_TO_PROTON_C |
| 80 | setPinOutput(D5); | 66 | setPinOutput(D5); |
| 81 | writePinHigh(D5); | 67 | writePinHigh(D5); |
| 82 | 68 | ||
| 83 | setPinOutput(B0); | 69 | setPinOutput(B0); |
| 84 | writePinHigh(B0); | 70 | writePinHigh(B0); |
| 85 | #endif | 71 | #endif |
| 86 | } | 72 | } |
diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h new file mode 100644 index 000000000..83d6283f5 --- /dev/null +++ b/keyboards/kyria/keymaps/drashna/config.h | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* Copyright 2019 Thomas Baart <thomas@splitkb.com> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #pragma once | ||
| 18 | |||
| 19 | #define EE_HANDS | ||
| 20 | |||
| 21 | #ifdef OLED_DRIVER_ENABLE | ||
| 22 | # define OLED_DISPLAY_128X64 | ||
| 23 | # define OLED_FONT_H "font_gmk_bad.h" | ||
| 24 | # define OLED_DISABLE_TIMEOUT | ||
| 25 | # define OLED_SCROLL_TIMEOUT_RIGHT 60000 | ||
| 26 | #endif | ||
| 27 | |||
| 28 | #ifdef RGBLIGHT_ENABLE | ||
| 29 | # define RGBLIGHT_SLEEP | ||
| 30 | # define RGBLIGHT_LIMIT_VAL 200 | ||
| 31 | # define RGBLIGHT_HUE_STEP 8 | ||
| 32 | # define RGBLIGHT_SAT_STEP 8 | ||
| 33 | # define RGBLIGHT_VAL_STEP 8 | ||
| 34 | #endif | ||
| 35 | |||
| 36 | // If you are using an Elite C rev3 on the slave side, uncomment the lines below: | ||
| 37 | #define SPLIT_USB_DETECT | ||
| 38 | #define SPLIT_USB_TIMEOUT 1000 | ||
diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c new file mode 100644 index 000000000..bdb00e596 --- /dev/null +++ b/keyboards/kyria/keymaps/drashna/keymap.c | |||
| @@ -0,0 +1,372 @@ | |||
| 1 | #include "drashna.h" | ||
| 2 | |||
| 3 | uint8_t is_master; | ||
| 4 | |||
| 5 | #ifdef OLED_DRIVER_ENABLE | ||
| 6 | # define KEYLOGGER_LENGTH 10 | ||
| 7 | static uint32_t oled_timer = 0; | ||
| 8 | static char keylog_str[KEYLOGGER_LENGTH + 1] = {"\n"}; | ||
| 9 | static uint16_t log_timer = 0; | ||
| 10 | // clang-format off | ||
| 11 | static const char PROGMEM code_to_name[0xFF] = { | ||
| 12 | // 0 1 2 3 4 5 6 7 8 9 A B c D E F | ||
| 13 | ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', // 0x | ||
| 14 | 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', // 1x | ||
| 15 | '3', '4', '5', '6', '7', '8', '9', '0', 20, 19, 27, 26, 22, '-', '=', '[', // 2x | ||
| 16 | ']','\\', '#', ';','\'', '`', ',', '.', '/', 128, ' ', ' ', ' ', ' ', ' ', ' ', // 3x | ||
| 17 | ' ', ' ', ' ', ' ', ' ', ' ', 'P', 'S', ' ', ' ', ' ', ' ', 16, ' ', ' ', ' ', // 4x | ||
| 18 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 5x | ||
| 19 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 6x | ||
| 20 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 7x | ||
| 21 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 8x | ||
| 22 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // 9x | ||
| 23 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ax | ||
| 24 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Bx | ||
| 25 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Cx | ||
| 26 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Dx | ||
| 27 | 'C', 'S', 'A', 'C', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', // Ex | ||
| 28 | ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' // Fx | ||
| 29 | }; | ||
| 30 | |||
| 31 | void add_keylog(uint16_t keycode); | ||
| 32 | #endif | ||
| 33 | |||
| 34 | #ifndef UNICODE_ENABLE | ||
| 35 | # define UC(x) KC_NO | ||
| 36 | #endif | ||
| 37 | |||
| 38 | /* | ||
| 39 | * The `LAYOUT_kyria_base` macro is a template to allow the use of identical | ||
| 40 | * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so | ||
| 41 | * that there is no need to set them up for each layout, and modify all of | ||
| 42 | * them if I want to change them. This helps to keep consistency and ease | ||
| 43 | * of use. K## is a placeholder to pass through the individual keycodes | ||
| 44 | */ | ||
| 45 | |||
| 46 | // clang-format off | ||
| 47 | #define LAYOUT_kyria_base( \ | ||
| 48 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | ||
| 49 | K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ | ||
| 50 | K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ | ||
| 51 | ) \ | ||
| 52 | LAYOUT_wrapper( \ | ||
| 53 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ | ||
| 54 | LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ | ||
| 55 | OS_LSFT, CTL_T(K21), K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ | ||
| 56 | KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ | ||
| 57 | ) | ||
| 58 | /* Re-pass though to allow templates to be used */ | ||
| 59 | #define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) | ||
| 60 | |||
| 61 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 62 | |||
| 63 | [_QWERTY] = LAYOUT_kyria_base_wrapper( | ||
| 64 | _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, | ||
| 65 | _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, | ||
| 66 | _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ | ||
| 67 | ), | ||
| 68 | |||
| 69 | [_COLEMAK] = LAYOUT_kyria_base_wrapper( | ||
| 70 | _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, | ||
| 71 | _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, | ||
| 72 | _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ | ||
| 73 | ), | ||
| 74 | |||
| 75 | [_DVORAK] = LAYOUT_kyria_base_wrapper( | ||
| 76 | _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, | ||
| 77 | _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, | ||
| 78 | _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ | ||
| 79 | ), | ||
| 80 | |||
| 81 | [_WORKMAN] = LAYOUT_kyria_base_wrapper( | ||
| 82 | _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, | ||
| 83 | _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, | ||
| 84 | _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ | ||
| 85 | ), | ||
| 86 | |||
| 87 | [_NORMAN] = LAYOUT_kyria_base_wrapper( | ||
| 88 | _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, | ||
| 89 | _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, | ||
| 90 | _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ | ||
| 91 | ), | ||
| 92 | |||
| 93 | [_MALTRON] = LAYOUT_kyria_base_wrapper( | ||
| 94 | _________________MALTRON_L1________________, _________________MALTRON_R1________________, | ||
| 95 | _________________MALTRON_L2________________, _________________MALTRON_R2________________, | ||
| 96 | _________________MALTRON_L3________________, _________________MALTRON_R3________________ | ||
| 97 | ), | ||
| 98 | |||
| 99 | [_EUCALYN] = LAYOUT_kyria_base_wrapper( | ||
| 100 | _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, | ||
| 101 | _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, | ||
| 102 | _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ | ||
| 103 | ), | ||
| 104 | |||
| 105 | [_CARPLAX] = LAYOUT_kyria_base_wrapper( | ||
| 106 | _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, | ||
| 107 | _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, | ||
| 108 | _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ | ||
| 109 | ), | ||
| 110 | [_MODS] = LAYOUT_wrapper( | ||
| 111 | _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, | ||
| 112 | _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, | ||
| 113 | KC_LSFT, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, KC_RSFT, | ||
| 114 | _______, _______, KC_LALT, _______, _______, _______, _______, KC_RGUI, _______, _______ | ||
| 115 | ), | ||
| 116 | [_LOWER] = LAYOUT_wrapper( | ||
| 117 | KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, | ||
| 118 | _______, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, | ||
| 119 | _______, _________________LOWER_L3__________________, _______, _______, _______, _______, _________________LOWER_R3__________________, _______, | ||
| 120 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 121 | ), | ||
| 122 | [_RAISE] = LAYOUT_wrapper( | ||
| 123 | KC_F12, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_F11, | ||
| 124 | _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, | ||
| 125 | _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _________________RAISE_R3__________________, _______, | ||
| 126 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 127 | ), | ||
| 128 | [_ADJUST] = LAYOUT_wrapper( | ||
| 129 | KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, | ||
| 130 | VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, | ||
| 131 | _______, _________________ADJUST_L3_________________, HPT_TOG, HPT_FBK, MG_NKRO, UC_MOD, _________________ADJUST_R3_________________, TG_MODS, | ||
| 132 | _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, _______ | ||
| 133 | ), | ||
| 134 | // [_LAYERINDEX] = LAYOUT_wrapper( | ||
| 135 | // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 136 | // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 137 | // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 138 | // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 139 | // ), | ||
| 140 | }; | ||
| 141 | // clang-format on | ||
| 142 | |||
| 143 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 144 | if (record->event.pressed) { | ||
| 145 | #ifdef OLED_DRIVER_ENABLE | ||
| 146 | oled_timer = timer_read32(); | ||
| 147 | add_keylog(keycode); | ||
| 148 | #endif | ||
| 149 | #ifndef SPLIT_KEYBOARD | ||
| 150 | if (keycode == RESET && !is_master) { | ||
| 151 | return false; | ||
| 152 | } | ||
| 153 | #endif | ||
| 154 | } | ||
| 155 | return true; | ||
| 156 | } | ||
| 157 | void matrix_init_keymap(void) { is_master = (uint8_t)is_keyboard_master(); } | ||
| 158 | |||
| 159 | #ifdef OLED_DRIVER_ENABLE | ||
| 160 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } | ||
| 161 | |||
| 162 | void add_keylog(uint16_t keycode) { | ||
| 163 | if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX) || (keycode >= QK_MODS && keycode <= QK_MODS_MAX)) { | ||
| 164 | keycode = keycode & 0xFF; | ||
| 165 | } else if (keycode > 0xFF) { | ||
| 166 | keycode = 0; | ||
| 167 | } | ||
| 168 | |||
| 169 | for (uint8_t i = (KEYLOGGER_LENGTH - 1); i > 0; --i) { | ||
| 170 | keylog_str[i] = keylog_str[i - 1]; | ||
| 171 | } | ||
| 172 | |||
| 173 | if (keycode < (sizeof(code_to_name) / sizeof(char))) { | ||
| 174 | keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); | ||
| 175 | } | ||
| 176 | |||
| 177 | log_timer = timer_read(); | ||
| 178 | } | ||
| 179 | |||
| 180 | void update_log(void) { | ||
| 181 | if (timer_elapsed(log_timer) > 750) { | ||
| 182 | // add_keylog(0); | ||
| 183 | } | ||
| 184 | } | ||
| 185 | |||
| 186 | void render_keylogger_status(void) { | ||
| 187 | oled_write_P(PSTR("Keylogger: "), false); | ||
| 188 | oled_write(keylog_str, false); | ||
| 189 | } | ||
| 190 | |||
| 191 | void render_default_layer_state(void) { | ||
| 192 | oled_write_P(PSTR("Layout: "), false); | ||
| 193 | switch (get_highest_layer(default_layer_state)) { | ||
| 194 | case _QWERTY: | ||
| 195 | oled_write_ln_P(PSTR("Qwerty "), false); | ||
| 196 | break; | ||
| 197 | case _COLEMAK: | ||
| 198 | oled_write_ln_P(PSTR("Colemak"), false); | ||
| 199 | break; | ||
| 200 | case _DVORAK: | ||
| 201 | oled_write_ln_P(PSTR("Dvorak"), false); | ||
| 202 | break; | ||
| 203 | case _WORKMAN: | ||
| 204 | oled_write_ln_P(PSTR("Workman"), false); | ||
| 205 | break; | ||
| 206 | case _NORMAN: | ||
| 207 | oled_write_ln_P(PSTR("Norman"), false); | ||
| 208 | break; | ||
| 209 | case _MALTRON: | ||
| 210 | oled_write_ln_P(PSTR("Maltron"), false); | ||
| 211 | break; | ||
| 212 | case _EUCALYN: | ||
| 213 | oled_write_ln_P(PSTR("Eucalyn"), false); | ||
| 214 | break; | ||
| 215 | case _CARPLAX: | ||
| 216 | oled_write_ln_P(PSTR("Carplax"), false); | ||
| 217 | break; | ||
| 218 | } | ||
| 219 | } | ||
| 220 | |||
| 221 | void render_layer_state(void) { | ||
| 222 | oled_write_ln_P(PSTR("Layer:"), false); | ||
| 223 | oled_write_P(PSTR(" "), false); | ||
| 224 | oled_write_P(PSTR("Lower"), layer_state_is(_LOWER)); | ||
| 225 | oled_write_P(PSTR(" "), false); | ||
| 226 | oled_write_P(PSTR("Raise"), layer_state_is(_RAISE)); | ||
| 227 | oled_write_P(PSTR(" "), false); | ||
| 228 | oled_write_ln_P(PSTR("Mods"), layer_state_is(_MODS)); | ||
| 229 | } | ||
| 230 | |||
| 231 | void render_keylock_status(uint8_t led_usb_state) { | ||
| 232 | oled_write_P(PSTR("Lock: "), false); | ||
| 233 | oled_write_P(PSTR("NUM"), led_usb_state & (1 << USB_LED_NUM_LOCK)); | ||
| 234 | oled_write_P(PSTR(" "), false); | ||
| 235 | oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK)); | ||
| 236 | oled_write_P(PSTR(" "), false); | ||
| 237 | oled_write_ln_P(PSTR("SCL"), led_usb_state & (1 << USB_LED_SCROLL_LOCK)); | ||
| 238 | } | ||
| 239 | |||
| 240 | void render_mod_status(uint8_t modifiers) { | ||
| 241 | oled_write_P(PSTR("Mods: "), false); | ||
| 242 | oled_write_P(PSTR("Sft"), (modifiers & MOD_MASK_SHIFT)); | ||
| 243 | oled_write_P(PSTR(" "), false); | ||
| 244 | oled_write_P(PSTR("Ctl"), (modifiers & MOD_MASK_CTRL)); | ||
| 245 | oled_write_P(PSTR(" "), false); | ||
| 246 | oled_write_P(PSTR("Alt"), (modifiers & MOD_MASK_ALT)); | ||
| 247 | oled_write_P(PSTR(" "), false); | ||
| 248 | oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); | ||
| 249 | } | ||
| 250 | |||
| 251 | void render_bootmagic_status(void) { | ||
| 252 | /* Show Ctrl-Gui Swap options */ | ||
| 253 | static const char PROGMEM logo[][2][3] = { | ||
| 254 | {{0x97, 0x98, 0}, {0xb7, 0xb8, 0}}, | ||
| 255 | {{0x95, 0x96, 0}, {0xb5, 0xb6, 0}}, | ||
| 256 | }; | ||
| 257 | oled_write_P(PSTR("Boot "), false); | ||
| 258 | oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui); | ||
| 259 | oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui); | ||
| 260 | oled_write_P(PSTR(" "), false); | ||
| 261 | oled_write_P(PSTR("NKRO"), keymap_config.nkro); | ||
| 262 | oled_write_P(PSTR(" "), false); | ||
| 263 | oled_write_ln_P(PSTR("GUI"), !keymap_config.no_gui); | ||
| 264 | oled_write_P(PSTR("Magic "), false); | ||
| 265 | oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); | ||
| 266 | oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); | ||
| 267 | oled_write_P(PSTR(" "), false); | ||
| 268 | oled_write_P(PSTR("GRV"), keymap_config.swap_grave_esc); | ||
| 269 | oled_write_P(PSTR(" "), false); | ||
| 270 | oled_write_ln_P(PSTR("CAPS"), keymap_config.swap_control_capslock); | ||
| 271 | } | ||
| 272 | |||
| 273 | void render_user_status(void) { | ||
| 274 | oled_write_P(PSTR("USER: "), false); | ||
| 275 | oled_write_P(PSTR("Anim"), userspace_config.rgb_matrix_idle_anim); | ||
| 276 | oled_write_P(PSTR(" "), false); | ||
| 277 | oled_write_P(PSTR("Layr"), userspace_config.rgb_layer_change); | ||
| 278 | oled_write_P(PSTR(" "), false); | ||
| 279 | oled_write_ln_P(PSTR("Nuke"), userspace_config.nuke_switch); | ||
| 280 | } | ||
| 281 | |||
| 282 | // clang-format off | ||
| 283 | void render_logo(void) { | ||
| 284 | static const char PROGMEM qmk_logo[] = { | ||
| 285 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, | ||
| 286 | 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, | ||
| 287 | 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; | ||
| 288 | |||
| 289 | oled_write_P(qmk_logo, false); | ||
| 290 | } | ||
| 291 | |||
| 292 | # ifndef SPLIT_TRANSPORT_MIRROR | ||
| 293 | void render_kyria_logo(void) { | ||
| 294 | static const char PROGMEM kyria_logo[] = { | ||
| 295 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 296 | 0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 297 | 0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 298 | 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0, | ||
| 299 | 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0, | ||
| 300 | 0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 301 | 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 302 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 | ||
| 303 | }; | ||
| 304 | oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); | ||
| 305 | } | ||
| 306 | # endif | ||
| 307 | // clang-format on | ||
| 308 | |||
| 309 | void render_status_main(void) { | ||
| 310 | /* Show Keyboard Layout */ | ||
| 311 | render_default_layer_state(); | ||
| 312 | render_keylock_status(host_keyboard_leds()); | ||
| 313 | render_bootmagic_status(); | ||
| 314 | render_user_status(); | ||
| 315 | |||
| 316 | render_keylogger_status(); | ||
| 317 | } | ||
| 318 | |||
| 319 | void render_status_secondary(void) { | ||
| 320 | /* Show Keyboard Layout */ | ||
| 321 | render_logo(); | ||
| 322 | render_default_layer_state(); | ||
| 323 | render_layer_state(); | ||
| 324 | render_mod_status(get_mods() | get_oneshot_mods()); | ||
| 325 | |||
| 326 | render_keylogger_status(); | ||
| 327 | } | ||
| 328 | |||
| 329 | void oled_task_user(void) { | ||
| 330 | if (timer_elapsed32(oled_timer) > 30000) { | ||
| 331 | oled_off(); | ||
| 332 | return; | ||
| 333 | } | ||
| 334 | # ifndef SPLIT_KEYBOARD | ||
| 335 | else { | ||
| 336 | oled_on(); | ||
| 337 | } | ||
| 338 | # endif | ||
| 339 | |||
| 340 | update_log(); | ||
| 341 | if (is_master) { | ||
| 342 | render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) | ||
| 343 | } else { | ||
| 344 | # ifdef SPLIT_TRANSPORT_MIRROR | ||
| 345 | render_status_secondary(); | ||
| 346 | # else | ||
| 347 | render_kyria_logo(); | ||
| 348 | # endif | ||
| 349 | } | ||
| 350 | } | ||
| 351 | |||
| 352 | #endif | ||
| 353 | |||
| 354 | #ifdef ENCODER_ENABLE | ||
| 355 | void encoder_update_user(uint8_t index, bool clockwise) { | ||
| 356 | if (index == 0) { | ||
| 357 | // Volume control | ||
| 358 | if (clockwise) { | ||
| 359 | tap_code(KC_VOLU); | ||
| 360 | } else { | ||
| 361 | tap_code(KC_VOLD); | ||
| 362 | } | ||
| 363 | } else if (index == 1) { | ||
| 364 | // Page up/Page down | ||
| 365 | if (clockwise) { | ||
| 366 | tap_code(KC_PGDN); | ||
| 367 | } else { | ||
| 368 | tap_code(KC_PGUP); | ||
| 369 | } | ||
| 370 | } | ||
| 371 | } | ||
| 372 | #endif | ||
diff --git a/keyboards/kyria/keymaps/drashna/rules.mk b/keyboards/kyria/keymaps/drashna/rules.mk new file mode 100644 index 000000000..c1a37f5c5 --- /dev/null +++ b/keyboards/kyria/keymaps/drashna/rules.mk | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | OLED_DRIVER_ENABLE = yes # Enables the use of OLED displays | ||
| 2 | ENCODER_ENABLE = yes # ENables the use of one or more encoders | ||
| 3 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 4 | RGBLIGHT_STARTUP_ANIMATION = yes | ||
| 5 | |||
| 6 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | ||
| 7 | MOUSEKEY_ENABLE = no # Mouse keys | ||
| 8 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 9 | CONSOLE_ENABLE = no # Console for debug | ||
| 10 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 11 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 12 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | ||
| 13 | MIDI_ENABLE = no # MIDI support | ||
| 14 | UNICODE_ENABLE = yes # Unicode | ||
| 15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 16 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 17 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | ||
| 18 | HD44780_ENABLE = no # Enable support for HD44780 based LCDs | ||
| 19 | |||
| 20 | BOOTLOADER = atmel-dfu | ||
| 21 | |||
| 22 | SPLIT_TRANSPORT = mirror | ||
diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index 4719c2269..585c91640 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h | |||
| @@ -34,41 +34,40 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 34 | 34 | ||
| 35 | /* key combination for magic key command */ | 35 | /* key combination for magic key command */ |
| 36 | #undef IS_COMMAND | 36 | #undef IS_COMMAND |
| 37 | #define IS_COMMAND() ( \ | 37 | #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT))) |
| 38 | get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ | ||
| 39 | ) | ||
| 40 | 38 | ||
| 41 | #ifdef RGBLIGHT_ENABLE | 39 | #ifdef RGBLIGHT_ENABLE |
| 42 | # define RGB_DI_PIN D3 | 40 | # define RGB_DI_PIN D3 |
| 43 | # define RGBLED_NUM 16 // Number of LEDs | 41 | # define RGBLED_NUM 16 // Number of LEDs |
| 44 | # define RGBLED_SPLIT { 8, 8 } | 42 | # define RGBLED_SPLIT \ |
| 45 | 43 | { 8, 8 } | |
| 46 | # define RGBLIGHT_HUE_STEP 12 | 44 | |
| 47 | # define RGBLIGHT_SAT_STEP 12 | 45 | # define RGBLIGHT_HUE_STEP 12 |
| 48 | # define RGBLIGHT_VAL_STEP 12 | 46 | # define RGBLIGHT_SAT_STEP 12 |
| 49 | # define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 | 47 | # define RGBLIGHT_VAL_STEP 12 |
| 50 | # define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 | 48 | # define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 |
| 51 | #endif // RGBLIGHT_ENABLE | 49 | # define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 |
| 50 | #endif // RGBLIGHT_ENABLE | ||
| 52 | 51 | ||
| 53 | #ifdef AUDIO_ENABLE | 52 | #ifdef AUDIO_ENABLE |
| 54 | # define C6_AUDIO | 53 | # define C6_AUDIO |
| 55 | # ifdef RGBLIGHT_ENABLE | 54 | # ifdef RGBLIGHT_ENABLE |
| 56 | # define NO_MUSIC_MODE | 55 | # define NO_MUSIC_MODE |
| 57 | # endif | 56 | # endif |
| 58 | #endif //AUDIO_ENABLE | 57 | #endif // AUDIO_ENABLE |
| 59 | 58 | ||
| 60 | #undef PRODUCT | 59 | #undef PRODUCT |
| 61 | #ifdef KEYBOARD_orthodox_rev1 | 60 | #ifdef KEYBOARD_orthodox_rev1 |
| 62 | # define PRODUCT Drashna Hacked Orthodox Rev.1 | 61 | # define PRODUCT Drashna Hacked Orthodox Rev .1 |
| 63 | #elif KEYBOARD_orthodox_rev3 | 62 | #elif KEYBOARD_orthodox_rev3 |
| 64 | # define PRODUCT Drashna Hacked Orthodox Rev.3 | 63 | # define PRODUCT Drashna Hacked Orthodox Rev .3 |
| 65 | #endif | 64 | #endif |
| 66 | 65 | ||
| 67 | #define QMK_ESC_OUTPUT D7 // usually COL | 66 | #define QMK_ESC_OUTPUT D7 // usually COL |
| 68 | #ifdef KEYBOARD_orthodox_rev1 | 67 | #ifdef KEYBOARD_orthodox_rev1 |
| 69 | # define QMK_ESC_INPUT D4 // usually ROW | 68 | # define QMK_ESC_INPUT D4 // usually ROW |
| 70 | #else | 69 | #else |
| 71 | # define QMK_ESC_INPUT D2 // usually ROW | 70 | # define QMK_ESC_INPUT D2 // usually ROW |
| 72 | #endif | 71 | #endif |
| 73 | #define QMK_LED B0 | 72 | #define QMK_LED B0 |
| 74 | #define QMK_SPEAKER C6 | 73 | #define QMK_SPEAKER C6 |
diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index bf6b62b41..2dbe18634 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c | |||
| @@ -1,35 +1,12 @@ | |||
| 1 | /* | ||
| 2 | This is the keymap for the keyboard | ||
| 3 | |||
| 4 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 5 | Copyright 2015 Jack Humbert | ||
| 6 | Copyright 2017 Art Ortenburger | ||
| 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 | #include QMK_KEYBOARD_H | ||
| 23 | #include "drashna.h" | 1 | #include "drashna.h" |
| 24 | 2 | ||
| 25 | #ifdef INDICATOR_LIGHTS | 3 | /* |
| 26 | extern userspace_config_t userspace_config; | 4 | * The `LAYOUT_orthodox_base` macro is a template to allow the use of identical |
| 27 | 5 | * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so | |
| 28 | uint8_t last_mod; | 6 | * that there is no need to set them up for each layout, and modify all of |
| 29 | uint8_t last_led; | 7 | * them if I want to change them. This helps to keep consistency and ease |
| 30 | uint8_t last_osm; | 8 | * of use. K## is a placeholder to pass through the individual keycodes |
| 31 | #endif | 9 | */ |
| 32 | |||
| 33 | // clang-format off | 10 | // clang-format off |
| 34 | #define LAYOUT_orthodox_base( \ | 11 | #define LAYOUT_orthodox_base( \ |
| 35 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | 12 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ |
| @@ -38,7 +15,7 @@ uint8_t last_osm; | |||
| 38 | ) \ | 15 | ) \ |
| 39 | LAYOUT_wrapper( \ | 16 | LAYOUT_wrapper( \ |
| 40 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ | 17 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ |
| 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), \ | 18 | LALT_T(KC_TAB), 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 \ | 19 | 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 | ) | 20 | ) |
| 44 | #define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) | 21 | #define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) |
diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index 494383299..0091ebcde 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h | |||
| @@ -1,18 +1,19 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #ifdef RGBLIGHT_ENABLE | 3 | #ifdef RGBLIGHT_ENABLE |
| 4 | # undef RGBLIGHT_SAT_STEP | 4 | # undef RGBLIGHT_SAT_STEP |
| 5 | # define RGBLIGHT_SAT_STEP 12 | 5 | # define RGBLIGHT_SAT_STEP 12 |
| 6 | |||
| 7 | # define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 | ||
| 8 | # define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 | ||
| 9 | #endif // RGBLIGHT_ENABLE | ||
| 10 | 6 | ||
| 7 | # define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 | ||
| 8 | # define RGBLIGHT_EFFECT_SNAKE_LENGTH 3 | ||
| 9 | #endif // RGBLIGHT_ENABLE | ||
| 11 | 10 | ||
| 12 | #undef PRODUCT | 11 | #undef PRODUCT |
| 13 | #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine | 12 | #define PRODUCT DrashnaDox - Hacked ErgoDox EZ Shine |
| 14 | 13 | ||
| 15 | #undef DEBOUNCE | 14 | #undef DEBOUNCE |
| 16 | #define DEBOUNCE 30 | 15 | #define DEBOUNCE 30 |
| 17 | 16 | ||
| 18 | #define TAPPING_TERM_PER_KEY | 17 | #define TAPPING_TERM_PER_KEY |
| 18 | |||
| 19 | #define ERGODOX_LED_30 | ||
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 6ed4558e2..8308bfdaa 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c | |||
| @@ -1,20 +1,3 @@ | |||
| 1 | /* | ||
| 2 | This is the keymap for the keyboard | ||
| 3 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 4 | Copyright 2015 Jack Humbert | ||
| 5 | Copyright 2017 Art Ortenburger | ||
| 6 | This program is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 2 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | This program is distributed in the hope that it will be useful, | ||
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | GNU General Public License for more details. | ||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | #include "drashna.h" | 1 | #include "drashna.h" |
| 19 | 2 | ||
| 20 | #ifdef UNICODEMAP_ENABLE | 3 | #ifdef UNICODEMAP_ENABLE |
| @@ -32,6 +15,13 @@ enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; | |||
| 32 | // define layer change stuff for underglow indicator | 15 | // define layer change stuff for underglow indicator |
| 33 | bool skip_leds = false; | 16 | bool skip_leds = false; |
| 34 | 17 | ||
| 18 | /* | ||
| 19 | * The `LAYOUT_ergodox_pretty_base` macro is a template to allow the use of | ||
| 20 | * identical modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, | ||
| 21 | * etc), so that there is no need to set them up for each layout, and modify | ||
| 22 | * all of them if I want to change them. This helps to keep consistency and | ||
| 23 | * ease of use. K## is a placeholder to pass through the individual keycodes | ||
| 24 | */ | ||
| 35 | // clang-format off | 25 | // clang-format off |
| 36 | #define LAYOUT_ergodox_pretty_base( \ | 26 | #define LAYOUT_ergodox_pretty_base( \ |
| 37 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | 27 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ |
| @@ -40,8 +30,8 @@ bool skip_leds = false; | |||
| 40 | ) \ | 30 | ) \ |
| 41 | LAYOUT_ergodox_pretty_wrapper( \ | 31 | LAYOUT_ergodox_pretty_wrapper( \ |
| 42 | KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ | 32 | KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \ |
| 43 | KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ | 33 | LALT_T(KC_TAB), K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \ |
| 44 | KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ | 34 | KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ |
| 45 | KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ | 35 | KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \ |
| 46 | KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ | 36 | KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \ |
| 47 | OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ | 37 | OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \ |
| @@ -402,7 +392,7 @@ void rgb_matrix_indicators_user(void) { | |||
| 402 | rgb_matrix_config.enable | 392 | rgb_matrix_config.enable |
| 403 | # endif | 393 | # endif |
| 404 | ) { | 394 | ) { |
| 405 | switch (biton32(layer_state)) { | 395 | switch (get_highest_layer(layer_state)) { |
| 406 | case _GAMEPAD: | 396 | case _GAMEPAD: |
| 407 | rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); | 397 | rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); |
| 408 | rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q | 398 | rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q |
| @@ -432,7 +422,7 @@ void rgb_matrix_indicators_user(void) { | |||
| 432 | break; | 422 | break; |
| 433 | default: { | 423 | default: { |
| 434 | bool mods_enabled = IS_LAYER_ON(_MODS); | 424 | bool mods_enabled = IS_LAYER_ON(_MODS); |
| 435 | switch (biton32(default_layer_state)) { | 425 | switch (get_highest_layer(default_layer_state)) { |
| 436 | case _QWERTY: | 426 | case _QWERTY: |
| 437 | rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); | 427 | rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); |
| 438 | break; | 428 | break; |
| @@ -466,7 +456,6 @@ void rgb_matrix_indicators_user(void) { | |||
| 466 | 456 | ||
| 467 | #endif // RGB_MATRIX_INIT | 457 | #endif // RGB_MATRIX_INIT |
| 468 | 458 | ||
| 469 | |||
| 470 | uint16_t get_tapping_term(uint16_t keycode) { | 459 | uint16_t get_tapping_term(uint16_t keycode) { |
| 471 | if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) { | 460 | if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) { |
| 472 | if (mod_config(keycode & 0xf) & MOD_MASK_ALT) { | 461 | if (mod_config(keycode & 0xf) & MOD_MASK_ALT) { |
diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index f9f9ea2ba..3aee59df6 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk | |||
| @@ -3,8 +3,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
| 3 | COMMAND_ENABLE = no # Commands for debug and configuration | 3 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 4 | SPACE_CADET_ENABLE = no | 4 | SPACE_CADET_ENABLE = no |
| 5 | ifeq ($(strip $(KEYBOARD)), ergodox_ez) | 5 | ifeq ($(strip $(KEYBOARD)), ergodox_ez) |
| 6 | RGBLIGHT_ENABLE = yes | 6 | RGBLIGHT_ENABLE = yes |
| 7 | RGB_MATRIX_ENABLE = no | 7 | RGB_MATRIX_ENABLE = no |
| 8 | endif | 8 | endif |
| 9 | CONSOLE_ENABLE = no | 9 | CONSOLE_ENABLE = no |
| 10 | BOOTMAGIC_ENABLE = yes | 10 | BOOTMAGIC_ENABLE = yes |
diff --git a/layouts/community/numpad_5x6/drashna/config.h b/layouts/community/numpad_5x6/drashna/config.h index 2fc5ab658..29045148e 100644 --- a/layouts/community/numpad_5x6/drashna/config.h +++ b/layouts/community/numpad_5x6/drashna/config.h | |||
| @@ -3,17 +3,17 @@ | |||
| 3 | // #define B6_AUDIO | 3 | // #define B6_AUDIO |
| 4 | 4 | ||
| 5 | #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) | 5 | #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) |
| 6 | # define RGB_DI_PIN B1 | 6 | # define RGB_DI_PIN B1 |
| 7 | # define RGBLED_NUM 16 // Number of LEDs | 7 | # define RGBLED_NUM 16 // Number of LEDs |
| 8 | 8 | ||
| 9 | # define RGBLIGHT_HUE_STEP 12 | 9 | # define RGBLIGHT_HUE_STEP 12 |
| 10 | # define RGBLIGHT_SAT_STEP 12 | 10 | # define RGBLIGHT_SAT_STEP 12 |
| 11 | # define RGBLIGHT_VAL_STEP 12 | 11 | # define RGBLIGHT_VAL_STEP 12 |
| 12 | # define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 | 12 | # define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 |
| 13 | # define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 | 13 | # define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 |
| 14 | #endif // RGBLIGHT_ENABLE | 14 | #endif // RGBLIGHT_ENABLE |
| 15 | 15 | ||
| 16 | #if defined(KEYBOARD_primekb_prime_m) | 16 | #if defined(KEYBOARD_primekb_prime_m) |
| 17 | # undef PRODUCT | 17 | # undef PRODUCT |
| 18 | # define PRODUCT Drashna Hacked Prime_M Macro Pad | 18 | # define PRODUCT Drashna Hacked Prime_M Macro Pad |
| 19 | #endif | 19 | #endif |
diff --git a/layouts/community/numpad_5x6/drashna/keymap.c b/layouts/community/numpad_5x6/drashna/keymap.c index 81710221d..3d325a4c1 100644 --- a/layouts/community/numpad_5x6/drashna/keymap.c +++ b/layouts/community/numpad_5x6/drashna/keymap.c | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | #include "drashna.h" | 1 | #include "drashna.h" |
| 3 | 2 | ||
| 4 | #define F2_MCRO LT(_GAMEPAD, KC_F2) | 3 | #define F2_MCRO LT(_GAMEPAD, KC_F2) |
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index d8ac5e6d1..663708afa 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | #pragma once | 1 | #pragma once |
| 2 | 2 | ||
| 3 | #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) | 3 | #if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) |
| 4 | # define RGB_DI_PIN A0 | 4 | # if defined(KEYBOARD_planck_light) |
| 5 | # define RGBLED_NUM 13 // Number of LEDs | 5 | # define RGB_DI_PIN A0 |
| 6 | # define RGBLIGHT_ANIMATIONS | 6 | # define RGBLED_NUM 13 // Number of LEDs |
| 7 | # endif | ||
| 7 | # define RGBLIGHT_HUE_STEP 12 | 8 | # define RGBLIGHT_HUE_STEP 12 |
| 8 | # define RGBLIGHT_SAT_STEP 12 | 9 | # define RGBLIGHT_SAT_STEP 12 |
| 9 | # define RGBLIGHT_VAL_STEP 12 | 10 | # define RGBLIGHT_VAL_STEP 12 |
| @@ -23,6 +24,9 @@ | |||
| 23 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | 24 | # define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended |
| 24 | # undef RGB_MATRIX_LED_PROCESS_LIMIT | 25 | # undef RGB_MATRIX_LED_PROCESS_LIMIT |
| 25 | # undef RGB_MATRIX_LED_FLUSH_LIMIT | 26 | # undef RGB_MATRIX_LED_FLUSH_LIMIT |
| 27 | # ifdef KEYBOARD_planck_rev6 | ||
| 28 | # define DRIVER_LED_TOTAL RGBLED_NUM | ||
| 29 | # endif | ||
| 26 | #endif | 30 | #endif |
| 27 | 31 | ||
| 28 | #if defined(KEYBOARD_lets_split_rev2) | 32 | #if defined(KEYBOARD_lets_split_rev2) |
| @@ -34,7 +38,7 @@ | |||
| 34 | #if !defined(KEYBOARD_planck_light) | 38 | #if !defined(KEYBOARD_planck_light) |
| 35 | # ifdef RGBLIGHT_ENABLE | 39 | # ifdef RGBLIGHT_ENABLE |
| 36 | # define NO_MUSIC_MODE | 40 | # define NO_MUSIC_MODE |
| 37 | # endif // RGBLIGHT_ENABLE | 41 | # endif // RGBLIGHT_ENABLE |
| 38 | #else | 42 | #else |
| 39 | # undef QMK_ESC_OUTPUT | 43 | # undef QMK_ESC_OUTPUT |
| 40 | # define QMK_ESC_OUTPUT E6 // usually COL | 44 | # define QMK_ESC_OUTPUT E6 // usually COL |
| @@ -45,7 +49,7 @@ | |||
| 45 | # undef QMK_SPEAKER | 49 | # undef QMK_SPEAKER |
| 46 | # define QMK_SPEAKER B5 | 50 | # define QMK_SPEAKER B5 |
| 47 | # define SOLENOID_PIN A1 | 51 | # define SOLENOID_PIN A1 |
| 48 | #endif // KEYBOARD_planck_light | 52 | #endif // KEYBOARD_planck_light |
| 49 | 53 | ||
| 50 | #if defined(KEYBOARD_planck) | 54 | #if defined(KEYBOARD_planck) |
| 51 | # undef PRODUCT | 55 | # undef PRODUCT |
| @@ -58,6 +62,7 @@ | |||
| 58 | # endif | 62 | # endif |
| 59 | #endif | 63 | #endif |
| 60 | 64 | ||
| 65 | #define ENCODER_DIRECTION_FLIP | ||
| 61 | /* | 66 | /* |
| 62 | * MIDI options | 67 | * MIDI options |
| 63 | */ | 68 | */ |
| @@ -82,26 +87,26 @@ | |||
| 82 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | 87 | /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ |
| 83 | //#define MIDI_TONE_KEYCODE_OCTAVES 2 | 88 | //#define MIDI_TONE_KEYCODE_OCTAVES 2 |
| 84 | 89 | ||
| 85 | #define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ | 90 | #define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ |
| 86 | #define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ | 91 | #define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ |
| 87 | #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ | 92 | #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ |
| 88 | 93 | ||
| 89 | /* default 3V ERM vibration motor voltage and library*/ | 94 | /* default 3V ERM vibration motor voltage and library*/ |
| 90 | #if FB_ERM_LRA == 0 | 95 | #if FB_ERM_LRA == 0 |
| 91 | #define RATED_VOLTAGE 3 | 96 | # define RATED_VOLTAGE 3 |
| 92 | #define V_RMS 2.3 | 97 | # define V_RMS 2.3 |
| 93 | #define V_PEAK 3.30 | 98 | # define V_PEAK 3.30 |
| 94 | /* Library Selection */ | 99 | /* Library Selection */ |
| 95 | #define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ | 100 | # define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ |
| 96 | 101 | ||
| 97 | /* default 2V LRA voltage and library */ | 102 | /* default 2V LRA voltage and library */ |
| 98 | #elif FB_ERM_LRA == 1 | 103 | #elif FB_ERM_LRA == 1 |
| 99 | #define RATED_VOLTAGE 2 | 104 | # define RATED_VOLTAGE 2 |
| 100 | #define V_RMS 2.0 | 105 | # define V_RMS 2.0 |
| 101 | #define V_PEAK 2.85 | 106 | # define V_PEAK 2.85 |
| 102 | #define F_LRA 200 | 107 | # define F_LRA 200 |
| 103 | /* Library Selection */ | 108 | /* Library Selection */ |
| 104 | #define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ | 109 | # define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ |
| 105 | 110 | ||
| 106 | #endif | 111 | #endif |
| 107 | 112 | ||
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 1c894c764..c3899cd03 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c | |||
| @@ -1,20 +1,3 @@ | |||
| 1 | /* Copyright 2015-2017 Jack Humbert | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include QMK_KEYBOARD_H | ||
| 18 | #include "drashna.h" | 1 | #include "drashna.h" |
| 19 | 2 | ||
| 20 | #ifdef RGBLIGHT_ENABLE | 3 | #ifdef RGBLIGHT_ENABLE |
| @@ -46,6 +29,13 @@ enum planck_keycodes { | |||
| 46 | # define PLNK_4 ET_RAIS | 29 | # define PLNK_4 ET_RAIS |
| 47 | #endif | 30 | #endif |
| 48 | 31 | ||
| 32 | /* | ||
| 33 | * The `LAYOUT_ortho_4x12_base` macro is a template to allow the use of identical | ||
| 34 | * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so | ||
| 35 | * that there is no need to set them up for each layout, and modify all of | ||
| 36 | * them if I want to change them. This helps to keep consistency and ease | ||
| 37 | * of use. K## is a placeholder to pass through the individual keycodes | ||
| 38 | */ | ||
| 49 | // clang-format off | 39 | // clang-format off |
| 50 | #define LAYOUT_ortho_4x12_base( \ | 40 | #define LAYOUT_ortho_4x12_base( \ |
| 51 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | 41 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ |
| @@ -54,7 +44,7 @@ enum planck_keycodes { | |||
| 54 | ) \ | 44 | ) \ |
| 55 | LAYOUT_ortho_4x12_wrapper( \ | 45 | LAYOUT_ortho_4x12_wrapper( \ |
| 56 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \ | 46 | KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \ |
| 57 | KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ | 47 | LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ |
| 58 | KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \ | 48 | KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \ |
| 59 | BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | 49 | BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ |
| 60 | ) | 50 | ) |
| @@ -159,14 +149,14 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | |||
| 159 | #ifdef KEYBOARD_planck_ez | 149 | #ifdef KEYBOARD_planck_ez |
| 160 | case TH_LVL: | 150 | case TH_LVL: |
| 161 | if (record->event.pressed) { | 151 | if (record->event.pressed) { |
| 162 | keyboard_config.led_level++; | 152 | keyboard_config.led_level++; |
| 163 | if (keyboard_config.led_level > 4) { | 153 | if (keyboard_config.led_level > 4) { |
| 164 | keyboard_config.led_level = 0; | 154 | keyboard_config.led_level = 0; |
| 165 | } | 155 | } |
| 166 | planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); | 156 | planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4); |
| 167 | planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4 ); | 157 | planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4); |
| 168 | eeconfig_update_kb(keyboard_config.raw); | 158 | eeconfig_update_kb(keyboard_config.raw); |
| 169 | layer_state_set_kb(layer_state); | 159 | layer_state_set_kb(layer_state); |
| 170 | } | 160 | } |
| 171 | break; | 161 | break; |
| 172 | #endif | 162 | #endif |
| @@ -190,6 +180,31 @@ bool music_mask_user(uint16_t keycode) { | |||
| 190 | 180 | ||
| 191 | #ifdef RGB_MATRIX_ENABLE | 181 | #ifdef RGB_MATRIX_ENABLE |
| 192 | 182 | ||
| 183 | # ifdef KEYBOARD_planck_rev6 | ||
| 184 | // clang-format off | ||
| 185 | led_config_t g_led_config = { | ||
| 186 | { | ||
| 187 | // Key Matrix to LED Index | ||
| 188 | { NO_LED, 6, NO_LED, NO_LED, 5, NO_LED }, | ||
| 189 | { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, | ||
| 190 | { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 0 }, | ||
| 191 | { NO_LED, 7, NO_LED, NO_LED, 2, NO_LED }, | ||
| 192 | { NO_LED, 4, NO_LED, NO_LED, 3, NO_LED }, | ||
| 193 | { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, | ||
| 194 | { NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }, | ||
| 195 | { NO_LED, 1, NO_LED, NO_LED, 8, NO_LED } | ||
| 196 | }, { | ||
| 197 | // LED Index to Physical Position | ||
| 198 | {112, 39}, {148, 60}, {206, 53}, {206, 3}, {150, 3}, {74, 3}, {18, 3}, {18, 54}, {77, 60} | ||
| 199 | }, { | ||
| 200 | // LED Index to Flag | ||
| 201 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, | ||
| 202 | LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL | ||
| 203 | } | ||
| 204 | }; | ||
| 205 | // clange-format on | ||
| 206 | # endif | ||
| 207 | |||
| 193 | // clang-format off | 208 | // clang-format off |
| 194 | void suspend_power_down_keymap(void) { | 209 | void suspend_power_down_keymap(void) { |
| 195 | rgb_matrix_set_suspend_state(true); | 210 | rgb_matrix_set_suspend_state(true); |
| @@ -219,7 +234,7 @@ void rgb_matrix_indicators_user(void) { | |||
| 219 | rgb_matrix_config.enable | 234 | rgb_matrix_config.enable |
| 220 | # endif | 235 | # endif |
| 221 | ) { | 236 | ) { |
| 222 | switch (biton32(layer_state)) { | 237 | switch (get_highest_layer(layer_state)) { |
| 223 | case _GAMEPAD: | 238 | case _GAMEPAD: |
| 224 | rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); | 239 | rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); |
| 225 | break; | 240 | break; |
| @@ -237,7 +252,7 @@ void rgb_matrix_indicators_user(void) { | |||
| 237 | break; | 252 | break; |
| 238 | default: { | 253 | default: { |
| 239 | bool mods_enabled = IS_LAYER_ON(_MODS); | 254 | bool mods_enabled = IS_LAYER_ON(_MODS); |
| 240 | switch (biton32(default_layer_state)) { | 255 | switch (get_highest_layer(default_layer_state)) { |
| 241 | case _QWERTY: | 256 | case _QWERTY: |
| 242 | rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); | 257 | rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); |
| 243 | break; | 258 | break; |
| @@ -268,7 +283,7 @@ void rgb_matrix_indicators_user(void) { | |||
| 268 | } | 283 | } |
| 269 | } | 284 | } |
| 270 | 285 | ||
| 271 | switch (biton32(default_layer_state)) { | 286 | switch (get_highest_layer(default_layer_state)) { |
| 272 | case _QWERTY: | 287 | case _QWERTY: |
| 273 | rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF); | 288 | rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF); |
| 274 | break; | 289 | break; |
| @@ -283,7 +298,9 @@ void rgb_matrix_indicators_user(void) { | |||
| 283 | break; | 298 | break; |
| 284 | } | 299 | } |
| 285 | if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { | 300 | if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { |
| 286 | if (!layer_state_cmp(layer_state, _ADJUST)) { rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); } | 301 | if (!layer_state_cmp(layer_state, _ADJUST)) { |
| 302 | rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); | ||
| 303 | } | ||
| 287 | rgb_matrix_set_color(36, 0x00, 0xFF, 0x00); | 304 | rgb_matrix_set_color(36, 0x00, 0xFF, 0x00); |
| 288 | } | 305 | } |
| 289 | if ((this_mod | this_osm) & MOD_MASK_CTRL) { | 306 | if ((this_mod | this_osm) & MOD_MASK_CTRL) { |
| @@ -320,7 +337,7 @@ void matrix_init_keymap(void) { | |||
| 320 | 337 | ||
| 321 | #ifdef ENCODER_ENABLE | 338 | #ifdef ENCODER_ENABLE |
| 322 | void encoder_update(bool clockwise) { | 339 | void encoder_update(bool clockwise) { |
| 323 | switch (biton32(layer_state)) { | 340 | switch (get_highest_layer(layer_state)) { |
| 324 | case _RAISE: | 341 | case _RAISE: |
| 325 | clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU); | 342 | clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU); |
| 326 | break; | 343 | break; |
| @@ -363,7 +380,7 @@ void dip_update(uint8_t index, bool active) { | |||
| 363 | } | 380 | } |
| 364 | break; | 381 | break; |
| 365 | case 2: | 382 | case 2: |
| 366 | keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = active; | 383 | keymap_config.swap_lctl_lgui = keymap_config.swap_rctl_rgui = active; |
| 367 | break; | 384 | break; |
| 368 | case 3: | 385 | case 3: |
| 369 | userspace_config.nuke_switch = active; | 386 | userspace_config.nuke_switch = active; |
| @@ -376,7 +393,7 @@ void dip_update(uint8_t index, bool active) { | |||
| 376 | layer_state_t layer_state_set_keymap(layer_state_t state) { | 393 | layer_state_t layer_state_set_keymap(layer_state_t state) { |
| 377 | planck_ez_left_led_off(); | 394 | planck_ez_left_led_off(); |
| 378 | planck_ez_right_led_off(); | 395 | planck_ez_right_led_off(); |
| 379 | switch (biton32(state)) { | 396 | switch (get_highest_layer(state)) { |
| 380 | case _LOWER: | 397 | case _LOWER: |
| 381 | planck_ez_left_led_on(); | 398 | planck_ez_left_led_on(); |
| 382 | break; | 399 | break; |
diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk index d4726b7a8..38d0d4517 100644 --- a/layouts/community/ortho_4x12/drashna/rules.mk +++ b/layouts/community/ortho_4x12/drashna/rules.mk | |||
| @@ -1,36 +1,40 @@ | |||
| 1 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | 1 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) |
| 2 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 2 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
| 3 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 3 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 4 | CONSOLE_ENABLE = no # Console for debug(+400) | 4 | TAP_DANCE_ENABLE = no |
| 5 | COMMAND_ENABLE = no # Commands for debug and configuration | 5 | AUDIO_ENABLE = yes |
| 6 | TAP_DANCE_ENABLE = no | ||
| 7 | AUDIO_ENABLE = yes | ||
| 8 | SPACE_CADET_ENABLE = no | 6 | SPACE_CADET_ENABLE = no |
| 7 | NKRO_ENABLE = yes | ||
| 9 | 8 | ||
| 10 | ifneq ($(strip $(KEYBOARD)), planck/rev6) | 9 | ifneq ($(strip $(KEYBOARD)), planck/rev6) |
| 11 | RGBLIGHT_ENABLE = yes | 10 | CONSOLE_ENABLE = no |
| 12 | INDICATOR_LIGHTS = yes | 11 | COMMAND_ENABLE = no |
| 13 | RGBLIGHT_TWINKLE = yes | 12 | ifeq ($(strip $(LAYOUT_HAS_RGB)), yes) |
| 14 | RGBLIGHT_STARTUP_ANIMATION = yes | 13 | RGBLIGHT_ENABLE = yes |
| 14 | endif | ||
| 15 | INDICATOR_LIGHTS = yes | ||
| 16 | RGBLIGHT_TWINKLE = yes | ||
| 17 | RGBLIGHT_STARTUP_ANIMATION = yes | ||
| 18 | else | ||
| 19 | CONSOLE_ENABLE = yes | ||
| 20 | COMMAND_ENABLE = yes | ||
| 21 | RGBLIGHT_ENABLE = no | ||
| 22 | RGB_MATRIX_ENABLE = WS2812 | ||
| 15 | endif | 23 | endif |
| 16 | ifeq ($(strip $(KEYBOARD)), planck/light) | 24 | ifeq ($(strip $(KEYBOARD)), planck/light) |
| 17 | RGB_MATRIX_ENABLE = yes | 25 | RGB_MATRIX_ENABLE = yes |
| 18 | RGBLIGHT_ENABLE = no | 26 | RGBLIGHT_ENABLE = no |
| 19 | RGBLIGHT_STARTUP_ANIMATION = no | 27 | RGBLIGHT_STARTUP_ANIMATION = no |
| 20 | HAPTIC_ENABLE += SOLENOID | 28 | # HAPTIC_ENABLE += SOLENOID |
| 21 | endif | 29 | endif |
| 22 | ifeq ($(strip $(KEYBOARD)), planck/ez) | 30 | ifeq ($(strip $(KEYBOARD)), planck/ez) |
| 23 | RGBLIGHT_ENABLE = no | 31 | RGBLIGHT_ENABLE = no |
| 24 | # SERIAL_LINK_ENABLE = yes | 32 | # SERIAL_LINK_ENABLE = yes |
| 25 | ENCODER_ENABLE = yes | 33 | ENCODER_ENABLE = yes |
| 26 | RGB_MATRIX_ENABLE = IS31FL3737 | 34 | RGB_MATRIX_ENABLE = IS31FL3737 |
| 27 | INDICATOR_LIGHTS = yes | 35 | INDICATOR_LIGHTS = yes |
| 28 | RGBLIGHT_TWINKLE = yes | 36 | RGBLIGHT_TWINKLE = yes |
| 29 | RGBLIGHT_STARTUP_ANIMATION = yes | 37 | RGBLIGHT_STARTUP_ANIMATION = yes |
| 30 | endif | 38 | CONSOLE_ENABLE = yes |
| 31 | 39 | COMMAND_ENABLE = yes | |
| 32 | ifeq ($(strip $(PROTOCOL)), VUSB) | ||
| 33 | NKRO_ENABLE = no | ||
| 34 | else | ||
| 35 | NKRO_ENABLE = yes | ||
| 36 | endif | 40 | endif |
diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c index 86a78336c..0ee9dfb10 100644 --- a/layouts/community/ortho_5x12/drashna/keymap.c +++ b/layouts/community/ortho_5x12/drashna/keymap.c | |||
| @@ -1,24 +1,12 @@ | |||
| 1 | /* Copyright 2015-2017 Jack Humbert | ||
| 2 | * Modified by KeyPCB for the Fractal keyboard | ||
| 3 | * Backlight isn't on the Fractal, so I've removed the keycode from the keymaps | ||
| 4 | * | ||
| 5 | * This program is free software: you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation, either version 2 of the License, or | ||
| 8 | * (at your option) any later version. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 17 | */ | ||
| 18 | |||
| 19 | #include QMK_KEYBOARD_H | ||
| 20 | #include "drashna.h" | 1 | #include "drashna.h" |
| 21 | 2 | ||
| 3 | /* | ||
| 4 | * The `LAYOUT_ortho_5x12_base` macro is a template to allow the use of identical | ||
| 5 | * modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so | ||
| 6 | * that there is no need to set them up for each layout, and modify all of | ||
| 7 | * them if I want to change them. This helps to keep consistency and ease | ||
| 8 | * of use. K## is a placeholder to pass through the individual keycodes | ||
| 9 | */ | ||
| 22 | // clang-format off | 10 | // clang-format off |
| 23 | #define LAYOUT_ortho_5x12_base( \ | 11 | #define LAYOUT_ortho_5x12_base( \ |
| 24 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ | 12 | K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ |
| @@ -27,9 +15,9 @@ | |||
| 27 | K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ | 15 | K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A \ |
| 28 | ) \ | 16 | ) \ |
| 29 | LAYOUT_ortho_5x12_wrapper( \ | 17 | LAYOUT_ortho_5x12_wrapper( \ |
| 30 | KC_GRV, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \ | 18 | KC_ESC, 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, \ | 19 | LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \ |
| 32 | KC_ESC, ALT_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, K2A, RALT_T(KC_QUOT), \ | 20 | KC_C1R3, 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, RCTL_T(K3A), KC_ENT, \ | 21 | 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 \ | 22 | 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 | ) | 23 | ) |
diff --git a/layouts/community/ortho_5x12/drashna/rules.mk b/layouts/community/ortho_5x12/drashna/rules.mk index 75affedd1..cae4b27ba 100644 --- a/layouts/community/ortho_5x12/drashna/rules.mk +++ b/layouts/community/ortho_5x12/drashna/rules.mk | |||
| @@ -5,16 +5,12 @@ 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 | AUDIO_ENABLE = yes | 7 | AUDIO_ENABLE = yes |
| 8 | ifeq ($(strip $(KEYBOARD)), fractal) | ||
| 9 | RGB_MATRIX_ENABLE = no | ||
| 10 | AUDIO_ENABLE = yes | ||
| 11 | RGBLIGHT_ENABLE = yes | ||
| 12 | RGBLIGHT_TWINKLE = yes | ||
| 13 | BOOTLOADER = qmk-dfu | ||
| 14 | endif | ||
| 15 | |||
| 16 | ifeq ($(strip $(PROTOCOL)), VUSB) | ||
| 17 | NKRO_ENABLE = no | ||
| 18 | else | ||
| 19 | NKRO_ENABLE = yes | 8 | NKRO_ENABLE = yes |
| 9 | |||
| 10 | ifeq ($(strip $(KEYBOARD)), fractal) | ||
| 11 | RGB_MATRIX_ENABLE = no | ||
| 12 | AUDIO_ENABLE = yes | ||
| 13 | RGBLIGHT_ENABLE = yes | ||
| 14 | RGBLIGHT_TWINKLE = yes | ||
| 15 | BOOTLOADER = qmk-dfu | ||
| 20 | endif | 16 | endif |
diff --git a/users/drashna/config.h b/users/drashna/config.h index a0f92d8f3..6fafff860 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #define USB_POLLING_INTERVAL_MS 1 | 7 | #define USB_POLLING_INTERVAL_MS 1 |
| 8 | 8 | ||
| 9 | #ifdef AUDIO_ENABLE | 9 | #ifdef AUDIO_ENABLE |
| 10 | # if __GNUC__ > 7 | 10 | # if __GNUC__ > 5 |
| 11 | # if __has_include("drashna_song_list.h") | 11 | # if __has_include("drashna_song_list.h") |
| 12 | # include "drashna_song_list.h" | 12 | # include "drashna_song_list.h" |
| 13 | # endif // if file exists | 13 | # endif // if file exists |
| @@ -29,11 +29,15 @@ | |||
| 29 | #endif // !AUDIO_ENABLE | 29 | #endif // !AUDIO_ENABLE |
| 30 | 30 | ||
| 31 | #ifdef RGBLIGHT_ENABLE | 31 | #ifdef RGBLIGHT_ENABLE |
| 32 | # define RGBLIGHT_SLEEP | ||
| 33 | # undef RGBLIGHT_ANIMATIONS | 32 | # undef RGBLIGHT_ANIMATIONS |
| 34 | # define RGBLIGHT_EFFECT_BREATHING | 33 | # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) |
| 35 | # define RGBLIGHT_EFFECT_SNAKE | 34 | # define RGBLIGHT_SLEEP |
| 36 | # define RGBLIGHT_EFFECT_KNIGHT | 35 | # define RGBLIGHT_EFFECT_BREATHING |
| 36 | # define RGBLIGHT_EFFECT_SNAKE | ||
| 37 | # define RGBLIGHT_EFFECT_KNIGHT | ||
| 38 | # else | ||
| 39 | # define RGBLIGHT_ANIMATIONS | ||
| 40 | # endif | ||
| 37 | #endif // RGBLIGHT_ENABLE | 41 | #endif // RGBLIGHT_ENABLE |
| 38 | 42 | ||
| 39 | #ifdef RGB_MATRIX_ENABLE | 43 | #ifdef RGB_MATRIX_ENABLE |
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index b48d837d0..71779a621 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c | |||
| @@ -25,8 +25,6 @@ userspace_config_t userspace_config; | |||
| 25 | # define DRASHNA_UNICODE_MODE 2 | 25 | # define DRASHNA_UNICODE_MODE 2 |
| 26 | #endif | 26 | #endif |
| 27 | 27 | ||
| 28 | |||
| 29 | |||
| 30 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { | 28 | bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) { |
| 31 | static uint16_t this_timer; | 29 | static uint16_t this_timer; |
| 32 | if (pressed) { | 30 | if (pressed) { |
| @@ -73,19 +71,22 @@ void bootmagic_lite(void) { | |||
| 73 | } | 71 | } |
| 74 | } | 72 | } |
| 75 | 73 | ||
| 74 | __attribute__((weak)) void keyboard_pre_init_keymap(void) {} | ||
| 75 | |||
| 76 | void keyboard_pre_init_user(void) { | ||
| 77 | userspace_config.raw = eeconfig_read_user(); | ||
| 78 | keyboard_pre_init_keymap(); | ||
| 79 | } | ||
| 76 | // Add reconfigurable functions here, for keymap customization | 80 | // Add reconfigurable functions here, for keymap customization |
| 77 | // This allows for a global, userspace functions, and continued | 81 | // This allows for a global, userspace functions, and continued |
| 78 | // customization of the keymap. Use _keymap instead of _user | 82 | // customization of the keymap. Use _keymap instead of _user |
| 79 | // functions in the keymaps | 83 | // functions in the keymaps |
| 80 | __attribute__((weak)) | 84 | __attribute__((weak)) void matrix_init_keymap(void) {} |
| 81 | void matrix_init_keymap(void) {} | ||
| 82 | 85 | ||
| 83 | // Call user matrix init, set default RGB colors and then | 86 | // Call user matrix init, set default RGB colors and then |
| 84 | // call the keymap's init function | 87 | // call the keymap's init function |
| 85 | void matrix_init_user(void) { | 88 | void matrix_init_user(void) { |
| 86 | userspace_config.raw = eeconfig_read_user(); | 89 | #if defined(BOOTLOADER_CATERINA) && defined(__AVR__) |
| 87 | |||
| 88 | #ifdef BOOTLOADER_CATERINA | ||
| 89 | DDRD &= ~(1 << 5); | 90 | DDRD &= ~(1 << 5); |
| 90 | PORTD &= ~(1 << 5); | 91 | PORTD &= ~(1 << 5); |
| 91 | 92 | ||
| @@ -100,8 +101,7 @@ void matrix_init_user(void) { | |||
| 100 | matrix_init_keymap(); | 101 | matrix_init_keymap(); |
| 101 | } | 102 | } |
| 102 | 103 | ||
| 103 | __attribute__((weak)) | 104 | __attribute__((weak)) void keyboard_post_init_keymap(void) {} |
| 104 | void keyboard_post_init_keymap(void) {} | ||
| 105 | 105 | ||
| 106 | void keyboard_post_init_user(void) { | 106 | void keyboard_post_init_user(void) { |
| 107 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | 107 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
| @@ -110,10 +110,9 @@ void keyboard_post_init_user(void) { | |||
| 110 | keyboard_post_init_keymap(); | 110 | keyboard_post_init_keymap(); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | __attribute__((weak)) | 113 | __attribute__((weak)) void shutdown_keymap(void) {} |
| 114 | void shutdown_keymap(void) {} | ||
| 115 | 114 | ||
| 116 | void rgb_matrix_update_pwm_buffers(void); | 115 | void rgb_matrix_update_pwm_buffers(void); |
| 117 | 116 | ||
| 118 | void shutdown_user(void) { | 117 | void shutdown_user(void) { |
| 119 | #ifdef RGBLIGHT_ENABLE | 118 | #ifdef RGBLIGHT_ENABLE |
| @@ -122,29 +121,22 @@ void shutdown_user(void) { | |||
| 122 | rgblight_setrgb_red(); | 121 | rgblight_setrgb_red(); |
| 123 | #endif // RGBLIGHT_ENABLE | 122 | #endif // RGBLIGHT_ENABLE |
| 124 | #ifdef RGB_MATRIX_ENABLE | 123 | #ifdef RGB_MATRIX_ENABLE |
| 125 | rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 ); | 124 | rgb_matrix_set_color_all(0xFF, 0x00, 0x00); |
| 126 | rgb_matrix_update_pwm_buffers(); | 125 | rgb_matrix_update_pwm_buffers(); |
| 127 | 126 | ||
| 128 | #endif // RGB_MATRIX_ENABLE | 127 | #endif // RGB_MATRIX_ENABLE |
| 129 | shutdown_keymap(); | 128 | shutdown_keymap(); |
| 130 | } | 129 | } |
| 131 | 130 | ||
| 132 | __attribute__((weak)) | 131 | __attribute__((weak)) void suspend_power_down_keymap(void) {} |
| 133 | void suspend_power_down_keymap(void) {} | ||
| 134 | 132 | ||
| 135 | void suspend_power_down_user(void) { | 133 | void suspend_power_down_user(void) { suspend_power_down_keymap(); } |
| 136 | suspend_power_down_keymap(); | ||
| 137 | } | ||
| 138 | 134 | ||
| 139 | __attribute__((weak)) | 135 | __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} |
| 140 | void suspend_wakeup_init_keymap(void) {} | ||
| 141 | 136 | ||
| 142 | void suspend_wakeup_init_user(void) { | 137 | void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); } |
| 143 | suspend_wakeup_init_keymap(); | ||
| 144 | } | ||
| 145 | 138 | ||
| 146 | __attribute__((weak)) | 139 | __attribute__((weak)) void matrix_scan_keymap(void) {} |
| 147 | void matrix_scan_keymap(void) {} | ||
| 148 | 140 | ||
| 149 | // No global matrix scan code, so just run keymap's matrix | 141 | // No global matrix scan code, so just run keymap's matrix |
| 150 | // scan function | 142 | // scan function |
| @@ -166,8 +158,7 @@ void matrix_scan_user(void) { | |||
| 166 | matrix_scan_keymap(); | 158 | matrix_scan_keymap(); |
| 167 | } | 159 | } |
| 168 | 160 | ||
| 169 | __attribute__((weak)) | 161 | __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } |
| 170 | layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } | ||
| 171 | 162 | ||
| 172 | // on layer change, no matter where the change was initiated | 163 | // on layer change, no matter where the change was initiated |
| 173 | // Then runs keymap's layer change check | 164 | // Then runs keymap's layer change check |
| @@ -179,32 +170,27 @@ layer_state_t layer_state_set_user(layer_state_t state) { | |||
| 179 | return layer_state_set_keymap(state); | 170 | return layer_state_set_keymap(state); |
| 180 | } | 171 | } |
| 181 | 172 | ||
| 182 | __attribute__((weak)) | 173 | __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } |
| 183 | layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; } | ||
| 184 | 174 | ||
| 185 | // Runs state check and changes underglow color and animation | 175 | // Runs state check and changes underglow color and animation |
| 186 | layer_state_t default_layer_state_set_user(layer_state_t state) { | 176 | layer_state_t default_layer_state_set_user(layer_state_t state) { |
| 187 | state = default_layer_state_set_keymap(state); | 177 | state = default_layer_state_set_keymap(state); |
| 188 | #if 0 | 178 | #if 0 |
| 189 | #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) | 179 | # if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) |
| 190 | state = default_layer_state_set_rgb(state); | 180 | state = default_layer_state_set_rgb(state); |
| 191 | # endif // RGBLIGHT_ENABLE | 181 | # endif // RGBLIGHT_ENABLE |
| 192 | #endif | 182 | #endif |
| 193 | return state; | 183 | return state; |
| 194 | } | 184 | } |
| 195 | 185 | ||
| 196 | __attribute__((weak)) | 186 | __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} |
| 197 | void led_set_keymap(uint8_t usb_led) {} | ||
| 198 | 187 | ||
| 199 | // Any custom LED code goes here. | 188 | // Any custom LED code goes here. |
| 200 | // So far, I only have keyboard specific code, | 189 | // So far, I only have keyboard specific code, |
| 201 | // So nothing goes here. | 190 | // So nothing goes here. |
| 202 | void led_set_user(uint8_t usb_led) { | 191 | void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } |
| 203 | led_set_keymap(usb_led); | ||
| 204 | } | ||
| 205 | 192 | ||
| 206 | __attribute__((weak)) | 193 | __attribute__((weak)) void eeconfig_init_keymap(void) {} |
| 207 | void eeconfig_init_keymap(void) {} | ||
| 208 | 194 | ||
| 209 | void eeconfig_init_user(void) { | 195 | void eeconfig_init_user(void) { |
| 210 | userspace_config.raw = 0; | 196 | userspace_config.raw = 0; |
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index 0ccb7614f..0ba181760 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h | |||
| @@ -16,7 +16,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #pragma once | 18 | #pragma once |
| 19 | #include "quantum.h" | 19 | #include QMK_KEYBOARD_H |
| 20 | |||
| 20 | #include "version.h" | 21 | #include "version.h" |
| 21 | #include "eeprom.h" | 22 | #include "eeprom.h" |
| 22 | #include "wrappers.h" | 23 | #include "wrappers.h" |
| @@ -62,6 +63,7 @@ void led_set_keymap(uint8_t usb_led); | |||
| 62 | void eeconfig_init_keymap(void); | 63 | void eeconfig_init_keymap(void); |
| 63 | bool hasAllBitsInMask(uint8_t value, uint8_t mask); | 64 | bool hasAllBitsInMask(uint8_t value, uint8_t mask); |
| 64 | 65 | ||
| 66 | // clang-format off | ||
| 65 | typedef union { | 67 | typedef union { |
| 66 | uint32_t raw; | 68 | uint32_t raw; |
| 67 | struct { | 69 | struct { |
| @@ -73,6 +75,7 @@ typedef union { | |||
| 73 | bool rgb_matrix_idle_anim :1; | 75 | bool rgb_matrix_idle_anim :1; |
| 74 | }; | 76 | }; |
| 75 | } userspace_config_t; | 77 | } userspace_config_t; |
| 78 | // clang-format on | ||
| 76 | 79 | ||
| 77 | extern userspace_config_t userspace_config; | 80 | extern userspace_config_t userspace_config; |
| 78 | 81 | ||
diff --git a/users/drashna/font_gmk_bad.h b/users/drashna/font_gmk_bad.h new file mode 100644 index 000000000..c1c5c390a --- /dev/null +++ b/users/drashna/font_gmk_bad.h | |||
| @@ -0,0 +1,241 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #ifdef __AVR__ | ||
| 4 | # include <avr/io.h> | ||
| 5 | # include <avr/pgmspace.h> | ||
| 6 | #elif defined(ESP8266) | ||
| 7 | # include <pgmspace.h> | ||
| 8 | #else | ||
| 9 | # define PROGMEM | ||
| 10 | #endif | ||
| 11 | |||
| 12 | // Corne 8x6 font with QMK Firmware Logo | ||
| 13 | // Online editor: https://helixfonteditor.netlify.com/ | ||
| 14 | |||
| 15 | // clang-format off | ||
| 16 | const unsigned char font[] PROGMEM = { | ||
| 17 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 18 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, | ||
| 19 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, | ||
| 20 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, | ||
| 21 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, | ||
| 22 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, | ||
| 23 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, | ||
| 24 | 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, | ||
| 25 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, | ||
| 26 | 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, | ||
| 27 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, | ||
| 28 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, | ||
| 29 | 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, | ||
| 30 | 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, | ||
| 31 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, | ||
| 32 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, | ||
| 33 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, | ||
| 34 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, | ||
| 35 | 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, | ||
| 36 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, | ||
| 37 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, | ||
| 38 | 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, | ||
| 39 | 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, | ||
| 40 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, | ||
| 41 | 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, | ||
| 42 | 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, | ||
| 43 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, | ||
| 44 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, | ||
| 45 | 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, | ||
| 46 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, | ||
| 47 | 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, | ||
| 48 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, | ||
| 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 50 | 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, | ||
| 51 | 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, | ||
| 52 | 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, | ||
| 53 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, | ||
| 54 | 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, | ||
| 55 | 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, | ||
| 56 | 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, | ||
| 57 | 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, | ||
| 58 | 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, | ||
| 59 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, | ||
| 60 | 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, | ||
| 61 | 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, | ||
| 62 | 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, | ||
| 63 | 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, | ||
| 64 | 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, | ||
| 65 | 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, | ||
| 66 | 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, | ||
| 67 | 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, | ||
| 68 | 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, | ||
| 69 | 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, | ||
| 70 | 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, | ||
| 71 | 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, | ||
| 72 | 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, | ||
| 73 | 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 74 | 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, | ||
| 75 | 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, | ||
| 76 | 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, | ||
| 77 | 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 78 | 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, | ||
| 79 | 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, | ||
| 80 | 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, | ||
| 81 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, | ||
| 82 | 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, | ||
| 83 | 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 84 | 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, | ||
| 85 | 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 86 | 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, | ||
| 87 | 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, | ||
| 88 | 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, | ||
| 89 | 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, | ||
| 90 | 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, | ||
| 91 | 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, | ||
| 92 | 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 93 | 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 94 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, | ||
| 95 | 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, | ||
| 96 | 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 97 | 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, | ||
| 98 | 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, | ||
| 99 | 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, | ||
| 100 | 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, | ||
| 101 | 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, | ||
| 102 | 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, | ||
| 103 | 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, | ||
| 104 | 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, | ||
| 105 | 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, | ||
| 106 | 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, | ||
| 107 | 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, | ||
| 108 | 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, | ||
| 109 | 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, | ||
| 110 | 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, | ||
| 111 | 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, | ||
| 112 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 113 | 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, | ||
| 114 | 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, | ||
| 115 | 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, | ||
| 116 | 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, | ||
| 117 | 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, | ||
| 118 | 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, | ||
| 119 | 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, | ||
| 120 | 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, | ||
| 121 | 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 122 | 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, | ||
| 123 | 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, | ||
| 124 | 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, | ||
| 125 | 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, | ||
| 126 | 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, | ||
| 127 | 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 128 | 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, | ||
| 129 | 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, | ||
| 130 | 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, | ||
| 131 | 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, | ||
| 132 | 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, | ||
| 133 | 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, | ||
| 134 | 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, | ||
| 135 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, | ||
| 136 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, | ||
| 137 | 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, | ||
| 138 | 0x4C, 0x90, 0x10, 0x90, 0x7C, 0x00, | ||
| 139 | 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, | ||
| 140 | 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, | ||
| 141 | 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, | ||
| 142 | 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, | ||
| 143 | 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, | ||
| 144 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, | ||
| 145 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 146 | 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, | ||
| 147 | 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, | ||
| 148 | 0xE0, 0xE0, 0x80, 0x00, 0x00, 0x00, | ||
| 149 | 0x00, 0x00, 0x00, 0x80, 0xF0, 0xF8, | ||
| 150 | 0xF8, 0xF8, 0xF8, 0x00, 0x00, 0x00, | ||
| 151 | 0x80, 0xE0, 0xF8, 0xF8, 0xF8, 0xF8, | ||
| 152 | 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 153 | 0x80, 0xF8, 0xF8, 0xF8, 0x38, 0x00, | ||
| 154 | 0x80, 0xE0, 0xF0, 0xF8, 0x78, 0x38, | ||
| 155 | 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, | ||
| 156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 157 | 0x80, 0xF8, 0xF8, 0xF8, 0x38, 0x38, | ||
| 158 | 0x38, 0xF8, 0xF0, 0xF0, 0xE0, 0x00, | ||
| 159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 160 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 161 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 162 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 163 | 0x00, 0x00, 0x00, 0x80, 0xFC, 0xFC, | ||
| 164 | 0xFC, 0x1C, 0x00, 0x00, 0x00, 0x00, | ||
| 165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 166 | 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, | ||
| 167 | 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, | ||
| 168 | 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, | ||
| 169 | 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 170 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 171 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 172 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 173 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 174 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 175 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 176 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, | ||
| 178 | 0xFF, 0xFF, 0xFF, 0xC1, 0x80, 0x00, | ||
| 179 | 0x00, 0x38, 0x38, 0xB8, 0xB8, 0xF9, | ||
| 180 | 0xF9, 0xF8, 0x38, 0x00, 0x00, 0x00, | ||
| 181 | 0x00, 0xC0, 0xF8, 0xFF, 0xFF, 0x1F, | ||
| 182 | 0x01, 0x3F, 0xFF, 0xFF, 0xF0, 0xFE, | ||
| 183 | 0x7F, 0x0F, 0x03, 0xFF, 0xFF, 0xFF, | ||
| 184 | 0xFF, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
| 185 | 0xFF, 0xFF, 0xFF, 0x3F, 0x1E, 0x7F, | ||
| 186 | 0xFF, 0xFF, 0xF3, 0xC1, 0x80, 0x00, | ||
| 187 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 188 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
| 189 | 0xFF, 0xFF, 0xFF, 0x3F, 0x1C, 0x1C, | ||
| 190 | 0x9C, 0xFF, 0xFF, 0xF3, 0xE1, 0x00, | ||
| 191 | 0x00, 0x00, 0x00, 0xF0, 0xFC, 0xFE, | ||
| 192 | 0xFF, 0x0F, 0x07, 0x07, 0x8E, 0xFF, | ||
| 193 | 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, | ||
| 194 | 0x00, 0xF0, 0xFC, 0xFE, 0xFF, 0x8F, | ||
| 195 | 0x07, 0x07, 0x8E, 0xFF, 0xFF, 0xFF, | ||
| 196 | 0x3F, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
| 197 | 0xC0, 0x80, 0x00, 0x00, 0x00, 0x00, | ||
| 198 | 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, | ||
| 199 | 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, | ||
| 200 | 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, | ||
| 201 | 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 202 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 203 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 204 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 205 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 206 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 207 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 210 | 0x00, 0x01, 0x03, 0x03, 0x03, 0x07, | ||
| 211 | 0x07, 0x07, 0x07, 0x03, 0x03, 0x03, | ||
| 212 | 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 213 | 0x06, 0x07, 0x07, 0x07, 0x01, 0x00, | ||
| 214 | 0x00, 0x00, 0x07, 0x07, 0x07, 0x01, | ||
| 215 | 0x00, 0x00, 0x00, 0x07, 0x07, 0x07, | ||
| 216 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, | ||
| 217 | 0x07, 0x07, 0x07, 0x00, 0x00, 0x00, | ||
| 218 | 0x00, 0x03, 0x07, 0x07, 0x07, 0x06, | ||
| 219 | 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 220 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, | ||
| 221 | 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, | ||
| 222 | 0x07, 0x07, 0x03, 0x01, 0x00, 0x00, | ||
| 223 | 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, | ||
| 224 | 0x07, 0x07, 0x07, 0x03, 0x07, 0x07, | ||
| 225 | 0x07, 0x07, 0x00, 0x00, 0x00, 0x00, | ||
| 226 | 0x00, 0x00, 0x03, 0x07, 0x07, 0x07, | ||
| 227 | 0x07, 0x03, 0x07, 0x07, 0x07, 0x07, | ||
| 228 | 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, | ||
| 229 | 0x07, 0x07, 0x01, 0x00, 0x00, 0x00, | ||
| 230 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 231 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 234 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 235 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 237 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 238 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 240 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 241 | }; | ||
diff --git a/users/drashna/hue_manitee_font.h b/users/drashna/hue_manitee_font.h new file mode 100644 index 000000000..72d50f7a6 --- /dev/null +++ b/users/drashna/hue_manitee_font.h | |||
| @@ -0,0 +1,241 @@ | |||
| 1 | #pragma once | ||
| 2 | |||
| 3 | #ifdef __AVR__ | ||
| 4 | # include <avr/io.h> | ||
| 5 | # include <avr/pgmspace.h> | ||
| 6 | #elif defined(ESP8266) | ||
| 7 | # include <pgmspace.h> | ||
| 8 | #else | ||
| 9 | # define PROGMEM | ||
| 10 | #endif | ||
| 11 | |||
| 12 | // Corne 8x6 font with QMK Firmware Logo | ||
| 13 | // Online editor: https://helixfonteditor.netlify.com/ | ||
| 14 | |||
| 15 | // clang-format off | ||
| 16 | const unsigned char font[] PROGMEM = { | ||
| 17 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 18 | 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, | ||
| 19 | 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, | ||
| 20 | 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, | ||
| 21 | 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, | ||
| 22 | 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, | ||
| 23 | 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, | ||
| 24 | 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, | ||
| 25 | 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, | ||
| 26 | 0x00, 0x18, 0x24, 0x18, 0x00, 0x00, | ||
| 27 | 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, | ||
| 28 | 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, | ||
| 29 | 0x26, 0x29, 0x79, 0x29, 0x26, 0x00, | ||
| 30 | 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, | ||
| 31 | 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, | ||
| 32 | 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, | ||
| 33 | 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, | ||
| 34 | 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, | ||
| 35 | 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, | ||
| 36 | 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, | ||
| 37 | 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, | ||
| 38 | 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, | ||
| 39 | 0x60, 0x60, 0x60, 0x60, 0x60, 0x00, | ||
| 40 | 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, | ||
| 41 | 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, | ||
| 42 | 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, | ||
| 43 | 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, | ||
| 44 | 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, | ||
| 45 | 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, | ||
| 46 | 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, | ||
| 47 | 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, | ||
| 48 | 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, | ||
| 49 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 50 | 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, | ||
| 51 | 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, | ||
| 52 | 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, | ||
| 53 | 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, | ||
| 54 | 0x23, 0x13, 0x08, 0x64, 0x62, 0x00, | ||
| 55 | 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, | ||
| 56 | 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, | ||
| 57 | 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, | ||
| 58 | 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, | ||
| 59 | 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, | ||
| 60 | 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, | ||
| 61 | 0x00, 0x80, 0x70, 0x30, 0x00, 0x00, | ||
| 62 | 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, | ||
| 63 | 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, | ||
| 64 | 0x20, 0x10, 0x08, 0x04, 0x02, 0x00, | ||
| 65 | 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, | ||
| 66 | 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, | ||
| 67 | 0x72, 0x49, 0x49, 0x49, 0x46, 0x00, | ||
| 68 | 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, | ||
| 69 | 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, | ||
| 70 | 0x27, 0x45, 0x45, 0x45, 0x39, 0x00, | ||
| 71 | 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, | ||
| 72 | 0x41, 0x21, 0x11, 0x09, 0x07, 0x00, | ||
| 73 | 0x36, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 74 | 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, | ||
| 75 | 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, | ||
| 76 | 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, | ||
| 77 | 0x00, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 78 | 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, | ||
| 79 | 0x00, 0x41, 0x22, 0x14, 0x08, 0x00, | ||
| 80 | 0x02, 0x01, 0x59, 0x09, 0x06, 0x00, | ||
| 81 | 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, | ||
| 82 | 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, | ||
| 83 | 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, | ||
| 84 | 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, | ||
| 85 | 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 86 | 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, | ||
| 87 | 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, | ||
| 88 | 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, | ||
| 89 | 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, | ||
| 90 | 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, | ||
| 91 | 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, | ||
| 92 | 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, | ||
| 93 | 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 94 | 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, | ||
| 95 | 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, | ||
| 96 | 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, | ||
| 97 | 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, | ||
| 98 | 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, | ||
| 99 | 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, | ||
| 100 | 0x26, 0x49, 0x49, 0x49, 0x32, 0x00, | ||
| 101 | 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, | ||
| 102 | 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, | ||
| 103 | 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, | ||
| 104 | 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, | ||
| 105 | 0x63, 0x14, 0x08, 0x14, 0x63, 0x00, | ||
| 106 | 0x03, 0x04, 0x78, 0x04, 0x03, 0x00, | ||
| 107 | 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, | ||
| 108 | 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, | ||
| 109 | 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, | ||
| 110 | 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, | ||
| 111 | 0x04, 0x02, 0x01, 0x02, 0x04, 0x00, | ||
| 112 | 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, | ||
| 113 | 0x00, 0x03, 0x07, 0x08, 0x00, 0x00, | ||
| 114 | 0x20, 0x54, 0x54, 0x78, 0x40, 0x00, | ||
| 115 | 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, | ||
| 116 | 0x38, 0x44, 0x44, 0x44, 0x28, 0x00, | ||
| 117 | 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, | ||
| 118 | 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, | ||
| 119 | 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, | ||
| 120 | 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, | ||
| 121 | 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 122 | 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, | ||
| 123 | 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, | ||
| 124 | 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, | ||
| 125 | 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, | ||
| 126 | 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, | ||
| 127 | 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, | ||
| 128 | 0x38, 0x44, 0x44, 0x44, 0x38, 0x00, | ||
| 129 | 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00, | ||
| 130 | 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00, | ||
| 131 | 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, | ||
| 132 | 0x48, 0x54, 0x54, 0x54, 0x24, 0x00, | ||
| 133 | 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, | ||
| 134 | 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, | ||
| 135 | 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, | ||
| 136 | 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, | ||
| 137 | 0x44, 0x28, 0x10, 0x28, 0x44, 0x00, | ||
| 138 | 0x4C, 0x90, 0x10, 0x90, 0x7C, 0x00, | ||
| 139 | 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, | ||
| 140 | 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, | ||
| 141 | 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, | ||
| 142 | 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, | ||
| 143 | 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, | ||
| 144 | 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, | ||
| 145 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 146 | 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, | ||
| 147 | 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4, | ||
| 148 | 0xC4, 0xA0, 0xE4, 0xB0, 0xDC, 0xE4, | ||
| 149 | 0xFC, 0xFC, 0xFC, 0xFC, 0x3C, 0x3C, | ||
| 150 | 0xFC, 0xF8, 0xF0, 0xF0, 0xE0, 0x00, | ||
| 151 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 152 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 153 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 154 | 0x00, 0x00, 0x00, 0x00, 0xF8, 0xF8, | ||
| 155 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 157 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 158 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 160 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 161 | 0xF8, 0xF8, 0x00, 0x00, 0x00, 0x00, | ||
| 162 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 163 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 164 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 166 | 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, | ||
| 167 | 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, | ||
| 168 | 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, | ||
| 169 | 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 170 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 171 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 172 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 173 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 174 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 175 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 176 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, | ||
| 178 | 0xFC, 0xF6, 0xF7, 0xEF, 0xFF, 0x87, | ||
| 179 | 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, | ||
| 180 | 0x1F, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, | ||
| 181 | 0xFF, 0x07, 0x1F, 0x1F, 0x19, 0x15, | ||
| 182 | 0xF7, 0x16, 0x1A, 0x1B, 0x16, 0x07, | ||
| 183 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 184 | 0x00, 0x00, 0x0C, 0x0C, 0x33, 0x33, | ||
| 185 | 0x33, 0x33, 0x33, 0x33, 0xC0, 0xC0, | ||
| 186 | 0x00, 0x00, 0x03, 0x03, 0xFF, 0xFF, | ||
| 187 | 0x03, 0x03, 0x00, 0x00, 0xC0, 0xC0, | ||
| 188 | 0x00, 0x00, 0x00, 0xFC, 0xFC, 0x03, | ||
| 189 | 0x03, 0x03, 0x03, 0x03, 0x03, 0xFC, | ||
| 190 | 0xFC, 0x00, 0x00, 0x00, 0xFC, 0xFC, | ||
| 191 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, | ||
| 192 | 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, | ||
| 193 | 0xFF, 0xFF, 0x30, 0x30, 0xCC, 0xCC, | ||
| 194 | 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 195 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 196 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 197 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 198 | 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, | ||
| 199 | 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, | ||
| 200 | 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, | ||
| 201 | 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, | ||
| 202 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 203 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 204 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 205 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 206 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 207 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 208 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 209 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
| 210 | 0x03, 0x07, 0x07, 0x07, 0x07, 0x01, | ||
| 211 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 212 | 0x00, 0x00, 0x00, 0x03, 0x07, 0x07, | ||
| 213 | 0x03, 0x00, 0x00, 0x02, 0x04, 0x00, | ||
| 214 | 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 215 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 216 | 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, | ||
| 217 | 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, | ||
| 218 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 219 | 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, | ||
| 220 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, | ||
| 221 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, | ||
| 222 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 223 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, | ||
| 224 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 225 | 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 226 | 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, | ||
| 227 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 228 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 229 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 230 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 231 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 234 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 235 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 237 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 238 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 240 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 241 | }; | ||
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 6eb21d2f2..2f79ad11c 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c | |||
| @@ -2,11 +2,9 @@ | |||
| 2 | 2 | ||
| 3 | uint16_t copy_paste_timer; | 3 | uint16_t copy_paste_timer; |
| 4 | 4 | ||
| 5 | __attribute__((weak)) | 5 | __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } |
| 6 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 7 | 6 | ||
| 8 | __attribute__((weak)) | 7 | __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } |
| 9 | bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } | ||
| 10 | 8 | ||
| 11 | // Defines actions tor my global custom keycodes. Defined in drashna.h file | 9 | // Defines actions tor my global custom keycodes. Defined in drashna.h file |
| 12 | // Then runs the _keymap's record handier if not processed here | 10 | // Then runs the _keymap's record handier if not processed here |
| @@ -23,7 +21,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 23 | switch (keycode) { | 21 | switch (keycode) { |
| 24 | case KC_QWERTY ... KC_WORKMAN: | 22 | case KC_QWERTY ... KC_WORKMAN: |
| 25 | if (record->event.pressed) { | 23 | if (record->event.pressed) { |
| 26 | uint8_t mods = mod_config(get_mods()|get_oneshot_mods()); | 24 | uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); |
| 27 | if (!mods) { | 25 | if (!mods) { |
| 28 | set_single_persistent_default_layer(keycode - KC_QWERTY); | 26 | set_single_persistent_default_layer(keycode - KC_QWERTY); |
| 29 | } else if (mods & MOD_MASK_SHIFT) { | 27 | } else if (mods & MOD_MASK_SHIFT) { |
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index a9af0566e..52ec61c22 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c | |||
| @@ -12,9 +12,9 @@ void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight | |||
| 12 | #if defined(RGB_MATRIX_ENABLE) | 12 | #if defined(RGB_MATRIX_ENABLE) |
| 13 | static uint32_t hypno_timer; | 13 | static uint32_t hypno_timer; |
| 14 | # if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) | 14 | # if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd) |
| 15 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL | 15 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL |
| 16 | # else | 16 | # else |
| 17 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN | 17 | # define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN |
| 18 | # endif | 18 | # endif |
| 19 | #endif | 19 | #endif |
| 20 | 20 | ||
| @@ -23,68 +23,68 @@ static uint32_t hypno_timer; | |||
| 23 | * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. | 23 | * This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up. |
| 24 | */ | 24 | */ |
| 25 | #ifdef RGBLIGHT_ENABLE | 25 | #ifdef RGBLIGHT_ENABLE |
| 26 | #ifdef INDICATOR_LIGHTS | 26 | # ifdef INDICATOR_LIGHTS |
| 27 | 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) { |
| 28 | if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) { | 28 | if (userspace_config.rgb_layer_change && get_highest_layer(layer_state) == 0) { |
| 29 | if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { | 29 | if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) { |
| 30 | # ifdef SHFT_LED1 | 30 | # ifdef SHFT_LED1 |
| 31 | rgblight_sethsv_at(120, 255, 255, SHFT_LED1); | 31 | rgblight_sethsv_at(120, 255, 255, SHFT_LED1); |
| 32 | # endif // SHFT_LED1 | 32 | # endif // SHFT_LED1 |
| 33 | # ifdef SHFT_LED2 | 33 | # ifdef SHFT_LED2 |
| 34 | rgblight_sethsv_at(120, 255, 255, SHFT_LED2); | 34 | rgblight_sethsv_at(120, 255, 255, SHFT_LED2); |
| 35 | # endif // SHFT_LED2 | 35 | # endif // SHFT_LED2 |
| 36 | } else { | 36 | } else { |
| 37 | # ifdef SHFT_LED1 | 37 | # ifdef SHFT_LED1 |
| 38 | rgblight_sethsv_default_helper(SHFT_LED1); | 38 | rgblight_sethsv_default_helper(SHFT_LED1); |
| 39 | # endif // SHFT_LED1 | 39 | # endif // SHFT_LED1 |
| 40 | # ifdef SHFT_LED2 | 40 | # ifdef SHFT_LED2 |
| 41 | rgblight_sethsv_default_helper(SHFT_LED2); | 41 | rgblight_sethsv_default_helper(SHFT_LED2); |
| 42 | # endif // SHFT_LED2 | 42 | # endif // SHFT_LED2 |
| 43 | } | 43 | } |
| 44 | if ((this_mod | this_osm) & MOD_MASK_CTRL) { | 44 | if ((this_mod | this_osm) & MOD_MASK_CTRL) { |
| 45 | # ifdef CTRL_LED1 | 45 | # ifdef CTRL_LED1 |
| 46 | rgblight_sethsv_at(0, 255, 255, CTRL_LED1); | 46 | rgblight_sethsv_at(0, 255, 255, CTRL_LED1); |
| 47 | # endif // CTRL_LED1 | 47 | # endif // CTRL_LED1 |
| 48 | # ifdef CTRL_LED2 | 48 | # ifdef CTRL_LED2 |
| 49 | rgblight_sethsv_at(0, 255, 255, CTRL_LED2); | 49 | rgblight_sethsv_at(0, 255, 255, CTRL_LED2); |
| 50 | # endif // CTRL_LED2 | 50 | # endif // CTRL_LED2 |
| 51 | } else { | 51 | } else { |
| 52 | # ifdef CTRL_LED1 | 52 | # ifdef CTRL_LED1 |
| 53 | rgblight_sethsv_default_helper(CTRL_LED1); | 53 | rgblight_sethsv_default_helper(CTRL_LED1); |
| 54 | # endif // CTRL_LED1 | 54 | # endif // CTRL_LED1 |
| 55 | # ifdef CTRL_LED2 | 55 | # ifdef CTRL_LED2 |
| 56 | rgblight_sethsv_default_helper(CTRL_LED2); | 56 | rgblight_sethsv_default_helper(CTRL_LED2); |
| 57 | # endif // CTRL_LED2 | 57 | # endif // CTRL_LED2 |
| 58 | } | 58 | } |
| 59 | if ((this_mod | this_osm) & MOD_MASK_GUI) { | 59 | if ((this_mod | this_osm) & MOD_MASK_GUI) { |
| 60 | # ifdef GUI_LED1 | 60 | # ifdef GUI_LED1 |
| 61 | rgblight_sethsv_at(51, 255, 255, GUI_LED1); | 61 | rgblight_sethsv_at(51, 255, 255, GUI_LED1); |
| 62 | # endif // GUI_LED1 | 62 | # endif // GUI_LED1 |
| 63 | # ifdef GUI_LED2 | 63 | # ifdef GUI_LED2 |
| 64 | rgblight_sethsv_at(51, 255, 255, GUI_LED2); | 64 | rgblight_sethsv_at(51, 255, 255, GUI_LED2); |
| 65 | # endif // GUI_LED2 | 65 | # endif // GUI_LED2 |
| 66 | } else { | 66 | } else { |
| 67 | # ifdef GUI_LED1 | 67 | # ifdef GUI_LED1 |
| 68 | rgblight_sethsv_default_helper(GUI_LED1); | 68 | rgblight_sethsv_default_helper(GUI_LED1); |
| 69 | # endif // GUI_LED1 | 69 | # endif // GUI_LED1 |
| 70 | # ifdef GUI_LED2 | 70 | # ifdef GUI_LED2 |
| 71 | rgblight_sethsv_default_helper(GUI_LED2); | 71 | rgblight_sethsv_default_helper(GUI_LED2); |
| 72 | # endif // GUI_LED2 | 72 | # endif // GUI_LED2 |
| 73 | } | 73 | } |
| 74 | if ((this_mod | this_osm) & MOD_MASK_ALT) { | 74 | if ((this_mod | this_osm) & MOD_MASK_ALT) { |
| 75 | # ifdef ALT_LED1 | 75 | # ifdef ALT_LED1 |
| 76 | rgblight_sethsv_at(240, 255, 255, ALT_LED1); | 76 | rgblight_sethsv_at(240, 255, 255, ALT_LED1); |
| 77 | # endif // ALT_LED1 | 77 | # endif // ALT_LED1 |
| 78 | # ifdef GUI_LED2 | 78 | # ifdef GUI_LED2 |
| 79 | rgblight_sethsv_at(240, 255, 255, ALT_LED2); | 79 | rgblight_sethsv_at(240, 255, 255, ALT_LED2); |
| 80 | # endif // GUI_LED2 | 80 | # endif // GUI_LED2 |
| 81 | } else { | 81 | } else { |
| 82 | # ifdef GUI_LED1 | 82 | # ifdef GUI_LED1 |
| 83 | rgblight_sethsv_default_helper(ALT_LED1); | 83 | rgblight_sethsv_default_helper(ALT_LED1); |
| 84 | # endif // GUI_LED1 | 84 | # endif // GUI_LED1 |
| 85 | # ifdef GUI_LED2 | 85 | # ifdef GUI_LED2 |
| 86 | rgblight_sethsv_default_helper(ALT_LED2); | 86 | rgblight_sethsv_default_helper(ALT_LED2); |
| 87 | # endif // GUI_LED2 | 87 | # endif // GUI_LED2 |
| 88 | } | 88 | } |
| 89 | } | 89 | } |
| 90 | } | 90 | } |
| @@ -95,9 +95,9 @@ void matrix_scan_indicator(void) { | |||
| 95 | set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); | 95 | set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods()); |
| 96 | } | 96 | } |
| 97 | } | 97 | } |
| 98 | #endif // INDICATOR_LIGHTS | 98 | # endif // INDICATOR_LIGHTS |
| 99 | 99 | ||
| 100 | #ifdef RGBLIGHT_TWINKLE | 100 | # ifdef RGBLIGHT_TWINKLE |
| 101 | static rgblight_fadeout lights[RGBLED_NUM]; | 101 | static rgblight_fadeout lights[RGBLED_NUM]; |
| 102 | 102 | ||
| 103 | __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; } |
| @@ -105,40 +105,40 @@ __attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { | |||
| 105 | /* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ | 105 | /* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */ |
| 106 | bool rgblight_twinkle_is_led_used(uint8_t index) { | 106 | bool rgblight_twinkle_is_led_used(uint8_t index) { |
| 107 | switch (index) { | 107 | switch (index) { |
| 108 | # ifdef INDICATOR_LIGHTS | 108 | # ifdef INDICATOR_LIGHTS |
| 109 | # ifdef SHFT_LED1 | 109 | # ifdef SHFT_LED1 |
| 110 | case SHFT_LED1: | 110 | case SHFT_LED1: |
| 111 | return true; | 111 | return true; |
| 112 | # endif // SHFT_LED1 | 112 | # endif // SHFT_LED1 |
| 113 | # ifdef SHFT_LED2 | 113 | # ifdef SHFT_LED2 |
| 114 | case SHFT_LED2: | 114 | case SHFT_LED2: |
| 115 | return true; | 115 | return true; |
| 116 | # endif // SHFT_LED2 | 116 | # endif // SHFT_LED2 |
| 117 | # ifdef CTRL_LED1 | 117 | # ifdef CTRL_LED1 |
| 118 | case CTRL_LED1: | 118 | case CTRL_LED1: |
| 119 | return true; | 119 | return true; |
| 120 | # endif // CTRL_LED1 | 120 | # endif // CTRL_LED1 |
| 121 | # ifdef CTRL_LED2 | 121 | # ifdef CTRL_LED2 |
| 122 | case CTRL_LED2: | 122 | case CTRL_LED2: |
| 123 | return true; | 123 | return true; |
| 124 | # endif // CTRL_LED2 | 124 | # endif // CTRL_LED2 |
| 125 | # ifdef GUI_LED1 | 125 | # ifdef GUI_LED1 |
| 126 | case GUI_LED1: | 126 | case GUI_LED1: |
| 127 | return true; | 127 | return true; |
| 128 | # endif // GUI_LED1 | 128 | # endif // GUI_LED1 |
| 129 | # ifdef GUI_LED2 | 129 | # ifdef GUI_LED2 |
| 130 | case GUI_LED2: | 130 | case GUI_LED2: |
| 131 | return true; | 131 | return true; |
| 132 | # endif // GUI_LED2 | 132 | # endif // GUI_LED2 |
| 133 | # ifdef ALT_LED1 | 133 | # ifdef ALT_LED1 |
| 134 | case ALT_LED1: | 134 | case ALT_LED1: |
| 135 | return true; | 135 | return true; |
| 136 | # endif // ALT_LED1 | 136 | # endif // ALT_LED1 |
| 137 | # ifdef ALT_LED2 | 137 | # ifdef ALT_LED2 |
| 138 | case ALT_LED2: | 138 | case ALT_LED2: |
| 139 | return true; | 139 | return true; |
| 140 | # endif // ALT_LED2 | 140 | # endif // ALT_LED2 |
| 141 | # endif // INDICATOR_LIGHTS | 141 | # endif // INDICATOR_LIGHTS |
| 142 | default: | 142 | default: |
| 143 | return rgblight_twinkle_is_led_used_keymap(index); | 143 | return rgblight_twinkle_is_led_used_keymap(index); |
| 144 | } | 144 | } |
| @@ -154,19 +154,19 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rg | |||
| 154 | 154 | ||
| 155 | if (light->life) { | 155 | if (light->life) { |
| 156 | light->life -= 1; | 156 | light->life -= 1; |
| 157 | if (biton32(layer_state) == 0) { | 157 | if (get_highest_layer(layer_state) == 0) { |
| 158 | sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); | 158 | sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); |
| 159 | } | 159 | } |
| 160 | light->timer = timer_read(); | 160 | light->timer = timer_read(); |
| 161 | } else { | 161 | } else { |
| 162 | if (light->enabled && biton32(layer_state) == 0) { | 162 | if (light->enabled && get_highest_layer(layer_state) == 0) { |
| 163 | rgblight_sethsv_default_helper(light_index); | 163 | rgblight_sethsv_default_helper(light_index); |
| 164 | } | 164 | } |
| 165 | litup = light->enabled = false; | 165 | litup = light->enabled = false; |
| 166 | } | 166 | } |
| 167 | } | 167 | } |
| 168 | } | 168 | } |
| 169 | if (litup && biton32(layer_state) == 0) { | 169 | if (litup && get_highest_layer(layer_state) == 0) { |
| 170 | rgblight_set(); | 170 | rgblight_set(); |
| 171 | } | 171 | } |
| 172 | } | 172 | } |
| @@ -211,8 +211,8 @@ void start_rgb_light(void) { | |||
| 211 | 211 | ||
| 212 | rgblight_sethsv_at(light->hue, 255, light->life, light_index); | 212 | rgblight_sethsv_at(light->hue, 255, light->life, light_index); |
| 213 | } | 213 | } |
| 214 | #endif | 214 | # endif |
| 215 | #endif // RGBLIGHT_ENABLE | 215 | #endif // RGBLIGHT_ENABLE |
| 216 | 216 | ||
| 217 | 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; | 218 | uint16_t temp_keycode = keycode; |
| @@ -259,7 +259,9 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 259 | userspace_config.rgb_matrix_idle_anim ^= 1; | 259 | userspace_config.rgb_matrix_idle_anim ^= 1; |
| 260 | dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); | 260 | dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); |
| 261 | eeconfig_update_user(userspace_config.raw); | 261 | eeconfig_update_user(userspace_config.raw); |
| 262 | if (userspace_config.rgb_matrix_idle_anim) { rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); } | 262 | if (userspace_config.rgb_matrix_idle_anim) { |
| 263 | rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); | ||
| 264 | } | ||
| 263 | } | 265 | } |
| 264 | #endif | 266 | #endif |
| 265 | break; | 267 | break; |
| @@ -281,7 +283,9 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 281 | is_eeprom_updated = true; | 283 | is_eeprom_updated = true; |
| 282 | } | 284 | } |
| 283 | #endif | 285 | #endif |
| 284 | if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); } | 286 | if (is_eeprom_updated) { |
| 287 | eeconfig_update_user(userspace_config.raw); | ||
| 288 | } | ||
| 285 | } | 289 | } |
| 286 | break; | 290 | break; |
| 287 | } | 291 | } |
| @@ -290,7 +294,7 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { | |||
| 290 | 294 | ||
| 291 | void keyboard_post_init_rgb(void) { | 295 | void keyboard_post_init_rgb(void) { |
| 292 | #if defined(RGBLIGHT_ENABLE) | 296 | #if defined(RGBLIGHT_ENABLE) |
| 293 | # if defined(RGBLIGHT_STARTUP_ANIMATION) | 297 | # if defined(RGBLIGHT_STARTUP_ANIMATION) |
| 294 | bool is_enabled = rgblight_config.enable; | 298 | bool is_enabled = rgblight_config.enable; |
| 295 | if (userspace_config.rgb_layer_change) { | 299 | if (userspace_config.rgb_layer_change) { |
| 296 | rgblight_enable_noeeprom(); | 300 | rgblight_enable_noeeprom(); |
| @@ -309,13 +313,13 @@ void keyboard_post_init_rgb(void) { | |||
| 309 | rgblight_disable_noeeprom(); | 313 | rgblight_disable_noeeprom(); |
| 310 | } | 314 | } |
| 311 | 315 | ||
| 312 | # endif | 316 | # endif |
| 313 | layer_state_set_user(layer_state); | 317 | layer_state_set_user(layer_state); |
| 314 | #endif | 318 | #endif |
| 315 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) | 319 | #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) |
| 316 | if (userspace_config.rgb_matrix_idle_anim) { | 320 | if (userspace_config.rgb_matrix_idle_anim) { |
| 317 | rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); | 321 | rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); |
| 318 | } | 322 | } |
| 319 | #endif | 323 | #endif |
| 320 | } | 324 | } |
| 321 | 325 | ||
| @@ -337,67 +341,70 @@ void matrix_scan_rgb(void) { | |||
| 337 | #endif | 341 | #endif |
| 338 | } | 342 | } |
| 339 | 343 | ||
| 344 | #ifdef RGBLIGHT_ENABLE | ||
| 345 | void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { | ||
| 346 | rgblight_sethsv_noeeprom(hue, sat, val); | ||
| 347 | wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly | ||
| 348 | rgblight_mode_noeeprom(mode); | ||
| 349 | } | ||
| 350 | #endif | ||
| 351 | |||
| 340 | layer_state_t layer_state_set_rgb(layer_state_t state) { | 352 | layer_state_t layer_state_set_rgb(layer_state_t state) { |
| 341 | #ifdef RGBLIGHT_ENABLE | 353 | #ifdef RGBLIGHT_ENABLE |
| 342 | if (userspace_config.rgb_layer_change) { | 354 | if (userspace_config.rgb_layer_change) { |
| 343 | switch (biton32(state)) { | 355 | switch (get_highest_layer(state)) { |
| 344 | case _MACROS: | 356 | case _MACROS: |
| 345 | rgblight_sethsv_noeeprom_orange(); | 357 | rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3); |
| 346 | userspace_config.is_overwatch ? rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2) : rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 3); | ||
| 347 | break; | 358 | break; |
| 348 | case _MEDIA: | 359 | case _MEDIA: |
| 349 | rgblight_sethsv_noeeprom_chartreuse(); | 360 | rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1); |
| 350 | rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 1); | ||
| 351 | break; | 361 | break; |
| 352 | case _GAMEPAD: | 362 | case _GAMEPAD: |
| 353 | rgblight_sethsv_noeeprom_orange(); | 363 | rgblight_set_hsv_and_mode(HSV_ORANGE, RGBLIGHT_MODE_SNAKE + 2); |
| 354 | rgblight_mode_noeeprom(RGBLIGHT_MODE_SNAKE + 2); | ||
| 355 | break; | 364 | break; |
| 356 | case _DIABLO: | 365 | case _DIABLO: |
| 357 | rgblight_sethsv_noeeprom_red(); | 366 | rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_BREATHING + 3); |
| 358 | rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); | ||
| 359 | break; | 367 | break; |
| 360 | case _RAISE: | 368 | case _RAISE: |
| 361 | rgblight_sethsv_noeeprom_yellow(); | 369 | rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_BREATHING + 3); |
| 362 | rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); | ||
| 363 | break; | 370 | break; |
| 364 | case _LOWER: | 371 | case _LOWER: |
| 365 | rgblight_sethsv_noeeprom_green(); | 372 | rgblight_set_hsv_and_mode(HSV_GREEN, RGBLIGHT_MODE_BREATHING + 3); |
| 366 | rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); | ||
| 367 | break; | 373 | break; |
| 368 | case _ADJUST: | 374 | case _ADJUST: |
| 369 | rgblight_sethsv_noeeprom_red(); | 375 | rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); |
| 370 | rgblight_mode_noeeprom(RGBLIGHT_MODE_KNIGHT + 2); | ||
| 371 | break; | 376 | break; |
| 372 | default: // for any other layers, or the default layer | 377 | default: // for any other layers, or the default layer |
| 373 | switch (biton32(default_layer_state)) { | 378 | { |
| 379 | uint8_t mode = get_highest_layer(state) == _MODS ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT; | ||
| 380 | switch (get_highest_layer(default_layer_state)) { | ||
| 374 | case _COLEMAK: | 381 | case _COLEMAK: |
| 375 | rgblight_sethsv_noeeprom_magenta(); | 382 | rgblight_set_hsv_and_mode(HSV_MAGENTA, mode); |
| 376 | break; | 383 | break; |
| 377 | case _DVORAK: | 384 | case _DVORAK: |
| 378 | rgblight_sethsv_noeeprom_springgreen(); | 385 | rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); |
| 379 | break; | 386 | break; |
| 380 | case _WORKMAN: | 387 | case _WORKMAN: |
| 381 | rgblight_sethsv_noeeprom_goldenrod(); | 388 | rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); |
| 382 | break; | 389 | break; |
| 383 | case _NORMAN: | 390 | case _NORMAN: |
| 384 | rgblight_sethsv_noeeprom_coral(); | 391 | rgblight_set_hsv_and_mode(HSV_CORAL, mode); |
| 385 | break; | 392 | break; |
| 386 | case _MALTRON: | 393 | case _MALTRON: |
| 387 | rgblight_sethsv_noeeprom_yellow(); | 394 | rgblight_set_hsv_and_mode(HSV_YELLOW, mode); |
| 388 | break; | 395 | break; |
| 389 | case _EUCALYN: | 396 | case _EUCALYN: |
| 390 | rgblight_sethsv_noeeprom_pink(); | 397 | rgblight_set_hsv_and_mode(HSV_PINK, mode); |
| 391 | break; | 398 | break; |
| 392 | case _CARPLAX: | 399 | case _CARPLAX: |
| 393 | rgblight_sethsv_noeeprom_blue(); | 400 | rgblight_set_hsv_and_mode(HSV_BLUE, mode); |
| 394 | break; | 401 | break; |
| 395 | default: | 402 | default: |
| 396 | rgblight_sethsv_noeeprom_cyan(); | 403 | rgblight_set_hsv_and_mode(HSV_CYAN, mode); |
| 397 | break; | 404 | break; |
| 398 | } | 405 | } |
| 399 | biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it | ||
| 400 | break; | 406 | break; |
| 407 | } | ||
| 401 | } | 408 | } |
| 402 | } | 409 | } |
| 403 | #endif // RGBLIGHT_ENABLE | 410 | #endif // RGBLIGHT_ENABLE |
| @@ -408,6 +415,7 @@ layer_state_t layer_state_set_rgb(layer_state_t state) { | |||
| 408 | #ifdef RGB_MATRIX_ENABLE | 415 | #ifdef RGB_MATRIX_ENABLE |
| 409 | # include "lib/lib8tion/lib8tion.h" | 416 | # include "lib/lib8tion/lib8tion.h" |
| 410 | extern led_config_t g_led_config; | 417 | extern led_config_t g_led_config; |
| 418 | |||
| 411 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { | 419 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type) { |
| 412 | HSV hsv = {hue, sat, val}; | 420 | HSV hsv = {hue, sat, val}; |
| 413 | if (hsv.v > rgb_matrix_config.hsv.v) { | 421 | if (hsv.v > rgb_matrix_config.hsv.v) { |
diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h index 7e34c93c1..50b73c1c3 100644 --- a/users/drashna/rgb_stuff.h +++ b/users/drashna/rgb_stuff.h | |||
| @@ -20,13 +20,13 @@ layer_state_t layer_state_set_rgb(layer_state_t state); | |||
| 20 | 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 | 21 | ||
| 22 | #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) | 22 | #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE) |
| 23 | void scan_rgblight_fadeout(void); | 23 | void scan_rgblight_fadeout(void); |
| 24 | #endif | 24 | #endif |
| 25 | #if defined(RGBLIGHT_ENABLE) | 25 | #if defined(RGBLIGHT_ENABLE) |
| 26 | void rgblight_sethsv_default_helper(uint8_t index); | 26 | void rgblight_sethsv_default_helper(uint8_t index); |
| 27 | #endif | 27 | #endif |
| 28 | 28 | ||
| 29 | #ifdef RGB_MATRIX_ENABLE | 29 | #ifdef RGB_MATRIX_ENABLE |
| 30 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); | 30 | void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue); |
| 31 | void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type); | 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 | 32 | #endif |
diff --git a/users/drashna/rgblight_breathe_table.h b/users/drashna/rgblight_breathe_table.h index 05d347fcd..4c6ae38fa 100644 --- a/users/drashna/rgblight_breathe_table.h +++ b/users/drashna/rgblight_breathe_table.h | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | #ifndef RGBLIGHT_EFFECT_BREATHE_TABLE | 1 | #ifndef RGBLIGHT_EFFECT_BREATHE_TABLE |
| 2 | #define RGBLIGHT_EFFECT_BREATHE_TABLE | 2 | #define RGBLIGHT_EFFECT_BREATHE_TABLE |
| 3 | 3 | ||
| 4 | // clang-format off | ||
| 4 | const uint8_t rgblight_effect_breathe_table[] PROGMEM = { | 5 | const uint8_t rgblight_effect_breathe_table[] PROGMEM = { |
| 5 | /* #define RGBLIGHT_EFFECT_BREATHE_CENTER 0.00 */ | 6 | /* #define RGBLIGHT_EFFECT_BREATHE_CENTER 0.00 */ |
| 6 | /* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */ | 7 | /* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */ |
| 7 | 8 | ||
| 8 | #if RGBLIGHT_BREATHE_TABLE_SIZE == 256 | 9 | #if RGBLIGHT_BREATHE_TABLE_SIZE == 256 |
| 9 | 0x44, 0x45, 0x47, 0x48, 0x4a, 0x4b, 0x4c, 0x4e, | 10 | 0x44, 0x45, 0x47, 0x48, 0x4a, 0x4b, 0x4c, 0x4e, |
| @@ -110,7 +111,8 @@ const uint8_t rgblight_effect_breathe_table[] PROGMEM = { | |||
| 110 | 0x4e, 0x48 | 111 | 0x4e, 0x48 |
| 111 | #endif /* 64 bytes table */ | 112 | #endif /* 64 bytes table */ |
| 112 | }; | 113 | }; |
| 114 | // clang-format on | ||
| 113 | 115 | ||
| 114 | static const int table_scale = 256/sizeof(rgblight_effect_breathe_table); | 116 | static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table); |
| 115 | 117 | ||
| 116 | #endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */ | 118 | #endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */ |
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index 1b5a86385..882857fc8 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | SRC += drashna.c \ | 1 | SRC += drashna.c \ |
| 2 | process_records.c | 2 | process_records.c |
| 3 | 3 | ||
| 4 | LINK_TIME_OPTIMIZATION_ENABLE = yes | 4 | LTO_ENABLE = yes |
| 5 | SPACE_CADET_ENABLE = no | 5 | SPACE_CADET_ENABLE = no |
| 6 | 6 | ||
| 7 | ifneq ($(strip $(NO_SECRETS)), yes) | 7 | ifneq ($(strip $(NO_SECRETS)), yes) |
| 8 | ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") | 8 | ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") |
| 9 | SRC += secrets.c | 9 | SRC += secrets.c |
| 10 | endif | 10 | endif |
| 11 | ifeq ($(strip $(NO_SECRETS)), lite) | 11 | ifeq ($(strip $(NO_SECRETS)), lite) |
| 12 | OPT_DEFS += -DNO_SECRETS | 12 | OPT_DEFS += -DNO_SECRETS |
| 13 | endif | 13 | endif |
| 14 | endif | 14 | endif |
| 15 | 15 | ||
| 16 | ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) | 16 | ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) |
| @@ -52,3 +52,10 @@ endif | |||
| 52 | ifeq ($(strip $(MAKE_BOOTLOADER)), yes) | 52 | ifeq ($(strip $(MAKE_BOOTLOADER)), yes) |
| 53 | OPT_DEFS += -DMAKE_BOOTLOADER | 53 | OPT_DEFS += -DMAKE_BOOTLOADER |
| 54 | endif | 54 | endif |
| 55 | |||
| 56 | # At least until build.mk or the like drops, this is here to prevent | ||
| 57 | # VUSB boards from enabling NKRO, as they do not support it. Ideally | ||
| 58 | # this should be handled per keyboard, but until that happens ... | ||
| 59 | ifeq ($(strip $(PROTOCOL)), VUSB) | ||
| 60 | NKRO_ENABLE = no | ||
| 61 | endif \ No newline at end of file | ||
diff --git a/users/drashna/template.c b/users/drashna/template.c index d90e6bdec..833447daa 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c | |||
| @@ -1,124 +1,82 @@ | |||
| 1 | #include "template.h" | 1 | #include "template.h" |
| 2 | 2 | ||
| 3 | |||
| 4 | // Add reconfigurable functions here, for keymap customization | 3 | // Add reconfigurable functions here, for keymap customization |
| 5 | // This allows for a global, userspace functions, and continued | 4 | // This allows for a global, userspace functions, and continued |
| 6 | // customization of the keymap. Use _keymap instead of _user | 5 | // customization of the keymap. Use _keymap instead of _user |
| 7 | // functions in the keymaps | 6 | // functions in the keymaps |
| 8 | __attribute__ ((weak)) | 7 | __attribute__((weak)) void matrix_init_keymap(void) {} |
| 9 | void matrix_init_keymap(void) {} | ||
| 10 | 8 | ||
| 11 | // Call user matrix init, then call the keymap's init function | 9 | // Call user matrix init, then call the keymap's init function |
| 12 | void matrix_init_user(void) { | 10 | void matrix_init_user(void) { matrix_init_keymap(); } |
| 13 | matrix_init_keymap(); | ||
| 14 | } | ||
| 15 | 11 | ||
| 16 | 12 | __attribute__((weak)) void matrix_scan_keymap(void) {} | |
| 17 | __attribute__ ((weak)) | ||
| 18 | void matrix_scan_keymap(void) {} | ||
| 19 | 13 | ||
| 20 | // No global matrix scan code, so just run keymap's matix | 14 | // No global matrix scan code, so just run keymap's matix |
| 21 | // scan function | 15 | // scan function |
| 22 | void matrix_scan_user(void) { | 16 | void matrix_scan_user(void) { matrix_scan_keymap(); } |
| 23 | matrix_scan_keymap(); | ||
| 24 | } | ||
| 25 | 17 | ||
| 26 | 18 | __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } | |
| 27 | __attribute__ ((weak)) | ||
| 28 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 29 | return true; | ||
| 30 | } | ||
| 31 | 19 | ||
| 32 | // Defines actions tor my global custom keycodes. Defined in drashna.h file | 20 | // Defines actions tor my global custom keycodes. Defined in drashna.h file |
| 33 | // Then runs the _keymap's recod handier if not processed here, | 21 | // Then runs the _keymap's recod handier if not processed here, |
| 34 | // And use "NEWPLACEHOLDER" for new safe range | 22 | // And use "NEWPLACEHOLDER" for new safe range |
| 35 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 23 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 36 | 24 | switch (keycode) { | |
| 37 | switch (keycode) { | 25 | case KC_MAKE: |
| 38 | case KC_MAKE: | 26 | if (!record->event.pressed) { |
| 39 | if (!record->event.pressed) { | 27 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP |
| 40 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP | 28 | #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) |
| 41 | #if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) | 29 | ":dfu" |
| 42 | ":dfu" | ||
| 43 | #elif defined(BOOTLOADER_HALFKAY) | 30 | #elif defined(BOOTLOADER_HALFKAY) |
| 44 | ":teensy" | 31 | ":teensy" |
| 45 | #elif defined(BOOTLOADER_CATERINA) | 32 | #elif defined(BOOTLOADER_CATERINA) |
| 46 | ":avrdude" | 33 | ":avrdude" |
| 47 | #endif | 34 | #endif |
| 48 | SS_TAP(X_ENTER)); | 35 | SS_TAP(X_ENTER)); |
| 36 | } | ||
| 37 | return false; | ||
| 38 | break; | ||
| 39 | |||
| 40 | case VRSN: | ||
| 41 | if (record->event.pressed) { | ||
| 42 | SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); | ||
| 43 | } | ||
| 44 | return false; | ||
| 45 | break; | ||
| 49 | } | 46 | } |
| 50 | return false; | 47 | return process_record_keymap(keycode, record); |
| 51 | break; | ||
| 52 | |||
| 53 | case VRSN: | ||
| 54 | if (record->event.pressed) { | ||
| 55 | SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); | ||
| 56 | } | ||
| 57 | return false; | ||
| 58 | break; | ||
| 59 | } | ||
| 60 | return process_record_keymap(keycode, record); | ||
| 61 | } | ||
| 62 | |||
| 63 | |||
| 64 | __attribute__ ((weak)) | ||
| 65 | layer_state_t layer_state_set_keymap (layer_state_t state) { | ||
| 66 | return state; | ||
| 67 | } | ||
| 68 | |||
| 69 | layer_state_t layer_state_set_user (layer_state_t state) { | ||
| 70 | return layer_state_set_keymap (state); | ||
| 71 | } | 48 | } |
| 72 | 49 | ||
| 50 | __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } | ||
| 73 | 51 | ||
| 52 | layer_state_t layer_state_set_user(layer_state_t state) { return layer_state_set_keymap(state); } | ||
| 74 | 53 | ||
| 75 | __attribute__ ((weak)) | 54 | __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} |
| 76 | void led_set_keymap(uint8_t usb_led) {} | ||
| 77 | |||
| 78 | void led_set_user(uint8_t usb_led) { | ||
| 79 | led_set_keymap(usb_led); | ||
| 80 | } | ||
| 81 | |||
| 82 | 55 | ||
| 56 | void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } | ||
| 83 | 57 | ||
| 84 | __attribute__ ((weak)) | 58 | __attribute__((weak)) void suspend_power_down_keymap(void) {} |
| 85 | void suspend_power_down_keymap(void) {} | ||
| 86 | |||
| 87 | void suspend_power_down_user(void) | ||
| 88 | { | ||
| 89 | suspend_power_down_keymap(); | ||
| 90 | } | ||
| 91 | |||
| 92 | 59 | ||
| 60 | void suspend_power_down_user(void) { suspend_power_down_keymap(); } | ||
| 93 | 61 | ||
| 94 | __attribute__ ((weak)) | 62 | __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} |
| 95 | void suspend_wakeup_init_keymap(void) {} | ||
| 96 | 63 | ||
| 97 | void suspend_wakeup_init_user(void) | 64 | void suspend_wakeup_init_user(void) { |
| 98 | { | 65 | suspend_wakeup_init_keymap(); |
| 99 | suspend_wakeup_init_keymap(); | 66 | #ifdef KEYBOARD_ergodox_ez |
| 100 | #ifdef KEYBOARD_ergodox_ez | 67 | wait_ms(10); |
| 101 | wait_ms(10); | 68 | #endif |
| 102 | #endif | ||
| 103 | } | 69 | } |
| 104 | 70 | ||
| 71 | __attribute__((weak)) void startup_keymap(void) {} | ||
| 105 | 72 | ||
| 106 | 73 | void startup_user(void) { | |
| 107 | __attribute__ ((weak)) | 74 | #ifdef RGBLIGHT_ENABLE |
| 108 | void startup_keymap(void) {} | ||
| 109 | |||
| 110 | void startup_user (void) { | ||
| 111 | #ifdef RGBLIGHT_ENABLE | ||
| 112 | matrix_init_rgb(); | 75 | matrix_init_rgb(); |
| 113 | #endif //RGBLIGHT_ENABLE | 76 | #endif // RGBLIGHT_ENABLE |
| 114 | startup_keymap(); | 77 | startup_keymap(); |
| 115 | } | 78 | } |
| 116 | 79 | ||
| 80 | __attribute__((weak)) void shutdown_keymap(void) {} | ||
| 117 | 81 | ||
| 118 | 82 | void shutdown_user(void) { shutdown_keymap(); } | |
| 119 | __attribute__ ((weak)) | ||
| 120 | void shutdown_keymap(void) {} | ||
| 121 | |||
| 122 | void shutdown_user (void) { | ||
| 123 | shutdown_keymap(); | ||
| 124 | } | ||
diff --git a/users/drashna/template.h b/users/drashna/template.h index dd1c48760..178f96e22 100644 --- a/users/drashna/template.h +++ b/users/drashna/template.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #ifndef USERSPACE | 1 | #pragma once |
| 2 | #define USERSPACE | ||
| 3 | 2 | ||
| 4 | #include "quantum.h" | 3 | #include QMK_KEYBOARD_H |
| 5 | #include "version.h" | 4 | #include "version.h" |
| 6 | #include "eeprom.h" | 5 | #include "eeprom.h" |
| 7 | 6 | ||
| @@ -9,10 +8,8 @@ | |||
| 9 | #define BASE 0 | 8 | #define BASE 0 |
| 10 | 9 | ||
| 11 | enum custom_keycodes { | 10 | enum custom_keycodes { |
| 12 | VRSN = SAFE_RANGE, // can always be here | 11 | VRSN = SAFE_RANGE, // can always be here |
| 13 | KC_MAKE, | 12 | KC_MAKE, |
| 14 | KC_RESET, | 13 | KC_RESET, |
| 15 | NEWPLACEHOLDER //use "NEWPLACEHOLDER for keymap specific codes | 14 | NEWPLACEHOLDER // use "NEWPLACEHOLDER for keymap specific codes |
| 16 | }; | 15 | }; |
| 17 | |||
| 18 | #endif | ||
