diff options
50 files changed, 993 insertions, 1396 deletions
diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c index b8947cce78..13f89dd53d 100644 --- a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c +++ b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c @@ -85,15 +85,15 @@ int16_t axisCoordinate(uint8_t pin, uint16_t origin) { int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed, int8_t polarity) { int coordinate = axisCoordinate(pin, origin); - if (coordinate == 0) { - return 0; - } else { + if (coordinate != 0) { float percent = (float)coordinate / 100; - if (keyboard_report->mods & MOD_BIT(KC_LSFT)) { + if (get_mods() & MOD_BIT(KC_LSFT)) { return percent * precisionSpeed * polarity * (abs(coordinate) / speedRegulator); } else { return percent * maxCursorSpeed * polarity * (abs(coordinate) / speedRegulator); } + } else { + return 0; } } diff --git a/keyboards/c39/keymaps/drashna/keymap.c b/keyboards/c39/keymaps/drashna/keymap.c index 88065263cf..6fd1f12984 100755 --- a/keyboards/c39/keymaps/drashna/keymap.c +++ b/keyboards/c39/keymaps/drashna/keymap.c @@ -39,54 +39,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_base_wrapper( + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), - [_COLEMAK] = LAYOUT_base_wrapper( + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_base_wrapper( + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - [_LOWER] = LAYOUT_wrapper( KC_TILD, _________________LOWER_L1__________________, _______, _________________LOWER_R1__________________, KC_BSPC, KC_DEL, _________________LOWER_L2__________________, _______, _________________LOWER_R2__________________, KC_PIPE, diff --git a/keyboards/gergo/keymaps/drashna/keymap.c b/keyboards/gergo/keymaps/drashna/keymap.c index 81ff6852d1..01d52ed162 100644 --- a/keyboards/gergo/keymaps/drashna/keymap.c +++ b/keyboards/gergo/keymaps/drashna/keymap.c @@ -37,56 +37,32 @@ KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \ ) -#define LAYOUT_gergo_base_wrapper(...) LAYOUT_gergo_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_gergo_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_gergo_base_wrapper( + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - [_COLEMAK] = LAYOUT_gergo_base_wrapper( + ), + + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_gergo_base_wrapper( + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_gergo_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_gergo_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_gergo_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_gergo_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_gergo_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - [_LOWER] = LAYOUT_gergo_wrapper( KC_F12, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, _______, _________________LOWER_L2__________________, _______, _______, _________________LOWER_R2__________________, KC_PIPE, diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c index 7e3c356bd9..28683cef3e 100644 --- a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/keymap.c @@ -32,58 +32,33 @@ KC_SPC, OS_LGUI, KC_ENT, \ BK_LWER, TT(_MOUSE), TT(_MOUSE), DL_RAIS \ ) -#define LAYOUT_4x6_right_base_wrapper(...) LAYOUT_4x6_right_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_4x6_right_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_4x6_right_base_wrapper( + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), - [_COLEMAK] = LAYOUT_4x6_right_base_wrapper( + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_4x6_right_base_wrapper( + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_4x6_right_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_4x6_right_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_4x6_right_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_4x6_right_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_4x6_right_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - [_MOUSE] = LAYOUT_4x6_right( _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, DPI_CONFIG, _______, _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, _______, @@ -182,26 +157,27 @@ void matrix_scan_keymap(void) { bool process_record_keymap(uint16_t keycode, keyrecord_t* record) { switch (keycode) { - case TT(_MOUSE): { - if (record->event.pressed) { - mouse_keycode_tracker++; - } else { + case TT(_MOUSE): + { + if (record->event.pressed) { + mouse_keycode_tracker++; + } else { # if TAPPING_TOGGLE != 0 - if (record->tap.count == TAPPING_TOGGLE) { - tap_toggling ^= 1; + if (record->tap.count == TAPPING_TOGGLE) { + tap_toggling ^= 1; # if TAPPING_TOGGLE == 1 - if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1; + if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1; # else - if (!tap_toggling) mouse_keycode_tracker -= record->tap.count; + if (!tap_toggling) mouse_keycode_tracker -= record->tap.count; # endif - } else { - mouse_keycode_tracker--; - } + } else { + mouse_keycode_tracker--; + } # endif + } + mouse_timer = timer_read(); + break; } - mouse_timer = timer_read(); - break; - } case MO(_MOUSE): case DPI_CONFIG: case KC_MS_UP ... KC_MS_WH_RIGHT: @@ -213,7 +189,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t* record) { layer_off(_MOUSE); } mouse_keycode_tracker = 0; - mouse_debounce_timer = timer_read(); + mouse_debounce_timer = timer_read(); break; } return true; @@ -238,6 +214,4 @@ void matrix_init_keymap(void) { #endif } -void keyboard_post_init_keymap(void) { - matrix_init_keymap(); -} +void keyboard_post_init_keymap(void) { matrix_init_keymap(); } diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c index 1766312e1b..af9cbda49d 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c +++ b/keyboards/handwired/tractyl_manuform/5x6_right/5x6_right.c @@ -32,4 +32,8 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, {{5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, {{5, 5}, {4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}}; + +# ifdef ENCODER_MAP_ENABLE +const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0}; +# endif #endif diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/config.h index 9dc46f2e60..915582c07e 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/config.h @@ -30,52 +30,56 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 6 // wiring of each half -#define MATRIX_COL_PINS { C0, C1, C2, C3, C4, C5 } -#define MATRIX_ROW_PINS { F7, F6, F5, F4, F3, F2 } +#define MATRIX_COL_PINS \ + { C0, C1, C2, C3, C4, C5 } +#define MATRIX_ROW_PINS \ + { F7, F6, F5, F4, F3, F2 } #define DIODE_DIRECTION COL2ROW // WS2812 RGB LED strip input and number of LEDs #define RGB_DI_PIN E7 -#define RGBLED_NUM 58 +#define RGBLED_NUM 20 #define RGBLIGHT_SPLIT -#define RGBLED_SPLIT { 30, 28 } +#define RGBLED_SPLIT \ + { 10, 10 } #define RGBLIGHT_SLEEP // #define RGBW -#define RGBLIGHT_LIMIT_VAL 50 +#define RGBLIGHT_LIMIT_VAL 100 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST /* number of backlight levels */ // #define BACKLIGHT_LEVELS 3 -#define DEBUG_LED_PIN D6 +#define DEBUG_LED_PIN D6 -#define ROTATIONAL_TRANSFORM_ANGLE -25 +#define ROTATIONAL_TRANSFORM_ANGLE -25 /* Bootmagic Lite key configuration */ -#define BOOTMAGIC_LITE_ROW 0 -#define BOOTMAGIC_LITE_COLUMN 0 -#define BOOTMAGIC_LITE_ROW_RIGHT 6 -#define BOOTMAGIC_LITE_COLUMN_RIGHT 5 +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 +#define BOOTMAGIC_LITE_ROW_RIGHT 6 +#define BOOTMAGIC_LITE_COLUMN_RIGHT 5 -#define AUDIO_PIN C6 -#define AUDIO_PIN_ALT B7 +#define AUDIO_PIN C6 +#define AUDIO_PIN_ALT B7 -#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 -#define DYNAMIC_KEYMAP_LAYER_COUNT 16 +#define DYNAMIC_KEYMAP_LAYER_COUNT 16 #define LAYER_STATE_16BIT /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D2 #define EE_HANDS -#define ENCODERS_PAD_A { D5 } -#define ENCODERS_PAD_B { D6 } -#define ENCODER_RESOLUTION 1 +#define ENCODERS_PAD_A \ + { D5 } +#define ENCODERS_PAD_B \ + { D6 } +#define ENCODER_RESOLUTION 4 /* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 +#define DEBOUNCE 5 /* disable action features */ //#define NO_ACTION_LAYER diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c index 6b6d1ab83c..a57da64d54 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c @@ -28,70 +28,44 @@ SH_TT, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, SH_TT, \ LALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(K1B), \ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ - OS_LGUI, OS_LALT, OS_RGUI, OS_RALT, \ - KC_PSCR, KC_GRV, MEH_T(KC_BTN3), \ + OS_LALT, OS_LGUI, OS_RGUI, OS_RALT, \ + KC_MUTE, KC_GRV, KC_BTN3, \ KC_SPC, OS_LGUI, KC_ENT, \ BK_LWER, TT(_MOUSE), TT(_MOUSE), DL_RAIS \ ) -#define LAYOUT_5x6_right_base_wrapper(...) LAYOUT_5x6_right_base(__VA_ARGS__) - +#define LAYOUT_base_wrapper(...) LAYOUT_5x6_right_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_5x6_right_base_wrapper( + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), - [_COLEMAK] = LAYOUT_5x6_right_base_wrapper( + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_5x6_right_base_wrapper( + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_5x6_right_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_5x6_right_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_5x6_right_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_5x6_right_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_5x6_right_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - [_MOUSE] = LAYOUT_5x6_right( _______, _______, _______, _______, _______, _______, DPI_CONFIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_D, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN6, _______, _______, _______, _______, _______, _______, _______, KC_BTN7, KC_BTN4, KC_BTN5, KC_BTN8, _______, _______, _______, _______, _______, _______, - _______, _______, _______, + _______, _______, KC_BTN3, _______, _______, _______, _______, _______, _______, _______ ), @@ -146,6 +120,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_NUKE, _______ ), }; + +#define BASE_ENCODERS { { KC_VOLD, KC_VOLU }, { KC_WH_D, KC_WH_U } } + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_DEFAULT_LAYER_1] = BASE_ENCODERS, + [_DEFAULT_LAYER_2] = BASE_ENCODERS, + [_DEFAULT_LAYER_3] = BASE_ENCODERS, + [_DEFAULT_LAYER_4] = BASE_ENCODERS, + [_GAMEPAD] = { { _______, _______ }, { _______, _______ } }, + [_DIABLO] = { { _______, _______ }, { _______, _______ } }, + [_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } }, + [_MEDIA] = { { _______, _______ }, { _______, _______ } }, + [_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } }, + [_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } }, + [_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } }, +}; +#else +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { + tap_code_delay(clockwise ? KC_VOLU : KC_VOLD, 5); + } else if (index == 1) { + tap_code_delay(clockwise ? KC_WH_U : KC_WH_D, 5); + } + return false; +} +#endif // clang-format on #ifdef POINTING_DEVICE_ENABLE @@ -189,26 +190,27 @@ void matrix_scan_keymap(void) { bool process_record_keymap(uint16_t keycode, keyrecord_t* record) { switch (keycode) { - case TT(_MOUSE): { - if (record->event.pressed) { - mouse_keycode_tracker++; - } else { + case TT(_MOUSE): + { + if (record->event.pressed) { + mouse_keycode_tracker++; + } else { # if TAPPING_TOGGLE != 0 - if (record->tap.count == TAPPING_TOGGLE) { - tap_toggling ^= 1; + if (record->tap.count == TAPPING_TOGGLE) { + tap_toggling ^= 1; # if TAPPING_TOGGLE == 1 - if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1; + if (!tap_toggling) mouse_keycode_tracker -= record->tap.count + 1; # else - if (!tap_toggling) mouse_keycode_tracker -= record->tap.count; + if (!tap_toggling) mouse_keycode_tracker -= record->tap.count; # endif - } else { - mouse_keycode_tracker--; - } + } else { + mouse_keycode_tracker--; + } # endif + } + mouse_timer = timer_read(); + break; } - mouse_timer = timer_read(); - break; - } case MO(_MOUSE): case DPI_CONFIG: case KC_MS_UP ... KC_MS_WH_RIGHT: @@ -216,11 +218,12 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t* record) { mouse_timer = timer_read(); break; default: + if (IS_NOEVENT(record->event)) break; if (layer_state_is(_MOUSE) && !mouse_keycode_tracker) { layer_off(_MOUSE); } mouse_keycode_tracker = 0; - mouse_debounce_timer = timer_read(); + mouse_debounce_timer = timer_read(); break; } return true; @@ -228,7 +231,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t* record) { layer_state_t layer_state_set_keymap(layer_state_t state) { if (layer_state_cmp(state, _GAMEPAD) || layer_state_cmp(state, _DIABLO)) { - state |= (1UL << _MOUSE); + state |= ((layer_state_t)1 << _MOUSE); } return state; } @@ -245,6 +248,4 @@ void matrix_init_keymap(void) { #endif } -void keyboard_post_init_keymap(void) { - matrix_init_keymap(); -} +void keyboard_post_init_keymap(void) { matrix_init_keymap(); } diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rgblight_breathe_table.h b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rgblight_breathe_table.h new file mode 100644 index 0000000000..fb921079bf --- /dev/null +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rgblight_breathe_table.h @@ -0,0 +1,117 @@ +#pragma once + +#define RGBLIGHT_EFFECT_BREATHE_TABLE + +// clang-format off + +// Breathing center: 1.85 +// Breathing max: 100 + +const uint8_t PROGMEM rgblight_effect_breathe_table[] = { +#if RGBLIGHT_BREATHE_TABLE_SIZE == 256 + 0x0D, 0x0E, 0x0E, 0x0F, 0x0F, 0x10, 0x10, 0x11, + 0x11, 0x12, 0x13, 0x13, 0x14, 0x14, 0x15, 0x16, + 0x16, 0x17, 0x18, 0x18, 0x19, 0x19, 0x1A, 0x1B, + 0x1B, 0x1C, 0x1D, 0x1E, 0x1E, 0x1F, 0x20, 0x20, + 0x21, 0x22, 0x22, 0x23, 0x24, 0x25, 0x25, 0x26, + 0x27, 0x28, 0x28, 0x29, 0x2A, 0x2B, 0x2B, 0x2C, + 0x2D, 0x2E, 0x2E, 0x2F, 0x30, 0x31, 0x31, 0x32, + 0x33, 0x34, 0x34, 0x35, 0x36, 0x37, 0x38, 0x38, + 0x39, 0x3A, 0x3B, 0x3B, 0x3C, 0x3D, 0x3D, 0x3E, + 0x3F, 0x40, 0x40, 0x41, 0x42, 0x42, 0x43, 0x44, + 0x44, 0x45, 0x46, 0x46, 0x47, 0x48, 0x48, 0x49, + 0x4A, 0x4A, 0x4B, 0x4B, 0x4C, 0x4C, 0x4D, 0x4D, + 0x4E, 0x4E, 0x4F, 0x4F, 0x50, 0x50, 0x51, 0x51, + 0x51, 0x52, 0x52, 0x53, 0x53, 0x53, 0x54, 0x54, + 0x54, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x56, + 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, + 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, 0x56, + 0x56, 0x55, 0x55, 0x55, 0x55, 0x55, 0x54, 0x54, + 0x54, 0x54, 0x53, 0x53, 0x53, 0x52, 0x52, 0x51, + 0x51, 0x51, 0x50, 0x50, 0x4F, 0x4F, 0x4E, 0x4E, + 0x4D, 0x4D, 0x4C, 0x4C, 0x4B, 0x4B, 0x4A, 0x4A, + 0x49, 0x48, 0x48, 0x47, 0x46, 0x46, 0x45, 0x44, + 0x44, 0x43, 0x42, 0x42, 0x41, 0x40, 0x40, 0x3F, + 0x3E, 0x3D, 0x3D, 0x3C, 0x3B, 0x3B, 0x3A, 0x39, + 0x38, 0x38, 0x37, 0x36, 0x35, 0x34, 0x34, 0x33, + 0x32, 0x31, 0x31, 0x30, 0x2F, 0x2E, 0x2E, 0x2D, + 0x2C, 0x2B, 0x2B, 0x2A, 0x29, 0x28, 0x28, 0x27, + 0x26, 0x25, 0x25, 0x24, 0x23, 0x22, 0x22, 0x21, + 0x20, 0x20, 0x1F, 0x1E, 0x1E, 0x1D, 0x1C, 0x1B, + 0x1B, 0x1A, 0x19, 0x19, 0x18, 0x18, 0x17, 0x16, + 0x16, 0x15, 0x14, 0x14, 0x13, 0x13, 0x12, 0x11, + 0x11, 0x10, 0x10, 0x0F, 0x0F, 0x0E, 0x0E, 0x0D +#endif + +#if RGBLIGHT_BREATHE_TABLE_SIZE == 128 + 0x0D, 0x0E, 0x0F, 0x10, + 0x11, 0x13, 0x14, 0x15, + 0x16, 0x18, 0x19, 0x1A, + 0x1B, 0x1D, 0x1E, 0x20, + 0x21, 0x22, 0x24, 0x25, + 0x27, 0x28, 0x2A, 0x2B, + 0x2D, 0x2E, 0x30, 0x31, + 0x33, 0x34, 0x36, 0x38, + 0x39, 0x3B, 0x3C, 0x3D, + 0x3F, 0x40, 0x42, 0x43, + 0x44, 0x46, 0x47, 0x48, + 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x4F, 0x50, 0x51, + 0x51, 0x52, 0x53, 0x54, + 0x54, 0x55, 0x55, 0x55, + 0x56, 0x56, 0x56, 0x56, + 0x56, 0x56, 0x56, 0x56, + 0x56, 0x55, 0x55, 0x54, + 0x54, 0x53, 0x53, 0x52, + 0x51, 0x50, 0x4F, 0x4E, + 0x4D, 0x4C, 0x4B, 0x4A, + 0x49, 0x48, 0x46, 0x45, + 0x44, 0x42, 0x41, 0x40, + 0x3E, 0x3D, 0x3B, 0x3A, + 0x38, 0x37, 0x35, 0x34, + 0x32, 0x31, 0x2F, 0x2E, + 0x2C, 0x2B, 0x29, 0x28, + 0x26, 0x25, 0x23, 0x22, + 0x20, 0x1F, 0x1E, 0x1C, + 0x1B, 0x19, 0x18, 0x17, + 0x16, 0x14, 0x13, 0x12, + 0x11, 0x10, 0x0F, 0x0E +#endif + +#if RGBLIGHT_BREATHE_TABLE_SIZE == 64 + 0x0D, 0x0F, + 0x11, 0x14, + 0x16, 0x19, + 0x1B, 0x1E, + 0x21, 0x24, + 0x27, 0x2A, + 0x2D, 0x30, + 0x33, 0x36, + 0x39, 0x3C, + 0x3F, 0x42, + 0x44, 0x47, + 0x4A, 0x4C, + 0x4E, 0x50, + 0x51, 0x53, + 0x54, 0x55, + 0x56, 0x56, + 0x56, 0x56, + 0x56, 0x55, + 0x54, 0x53, + 0x51, 0x4F, + 0x4D, 0x4B, + 0x49, 0x46, + 0x44, 0x41, + 0x3E, 0x3B, + 0x38, 0x35, + 0x32, 0x2F, + 0x2C, 0x29, + 0x26, 0x23, + 0x20, 0x1E, + 0x1B, 0x18, + 0x16, 0x13, + 0x11, 0x0F +#endif +}; + +static const int table_scale = 256 / sizeof(rgblight_effect_breathe_table); diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk index 7e0eee8bdc..b95b166d8d 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/rules.mk @@ -8,4 +8,5 @@ UNICODE_ENABLE = yes OLED_DRIVER_ENABLE = yes WPM_ENABLE = yes ENCODER_ENABLE = yes +ENCODER_MAP_ENABLE = yes # DEBOUNCE_TYPE = sym_eager_pk diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index fe5e67b52f..45b05e3502 100644 --- a/keyboards/keebio/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -38,58 +38,32 @@ OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \ ) -#define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_iris_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - - [_COLEMAK] = LAYOUT_iris_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), - - [_DVORAK] = LAYOUT_iris_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_WORKMAN] = LAYOUT_iris_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_iris_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_iris_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_iris_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_iris_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), [_GAMEPAD] = LAYOUT_wrapper( KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/config.h b/keyboards/keebio/iris/keymaps/drashna_lp/config.h deleted file mode 100644 index 414acab846..0000000000 --- a/keyboards/keebio/iris/keymaps/drashna_lp/config.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -/* Use I2C or Serial, not both */ -#include "../drashna/config.h" - -#ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 16 // Number of LEDs -# undef RGBLED_SPLIT -# define RGBLED_SPLIT \ - { 8, 8 } -#endif - -#undef PRODUCT -#ifdef KEYBOARD_keebio_iris_rev2 -# define PRODUCT Drashna Hacked Iris LP Rev .2(Backlit) -#endif - -#undef SHFT_LED1 -#define SHFT_LED1 5 -#undef SHFT_LED2 -#define SHFT_LED2 10 - -#undef CTRL_LED1 -#define CTRL_LED1 6 -#undef CTRL_LED2 -#define CTRL_LED2 9 - -#undef ALT_LED1 -#define ALT_LED1 7 -#undef GUI_LED1 -#define GUI_LED1 8 - -#define DRASHNA_LP diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/keymap.c b/keyboards/keebio/iris/keymaps/drashna_lp/keymap.c deleted file mode 100644 index ff7bd09c0c..0000000000 --- a/keyboards/keebio/iris/keymaps/drashna_lp/keymap.c +++ /dev/null @@ -1 +0,0 @@ -// placeholder diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk b/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk deleted file mode 100644 index d3f6f5550f..0000000000 --- a/keyboards/keebio/iris/keymaps/drashna_lp/rules.mk +++ /dev/null @@ -1,7 +0,0 @@ -USER_NAME := drashna -SRC += ../drashna/keymap.c - -include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk - -AUDIO_ENABLE = no -BACKLIGHT_ENABLE = yes diff --git a/keyboards/keebio/iris/keymaps/drashna_old/config.h b/keyboards/keebio/iris/keymaps/drashna_old/config.h deleted file mode 100644 index f08b22dca0..0000000000 --- a/keyboards/keebio/iris/keymaps/drashna_old/config.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#pragma once - -/* Use I2C or Serial, not both */ -#include "../drashna/config.h" - -#ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 16 // Number of LEDs -# undef RGBLED_SPLIT -# define RGBLED_SPLIT { 8, 8 } -#endif - -#undef PRODUCT -#ifdef KEYBOARD_keebio_iris_rev2 -# define PRODUCT Drashna Hacked Iris Rev.2 (16 LED) -#endif - -#undef SHFT_LED1 -#define SHFT_LED1 5 -#undef SHFT_LED2 -#define SHFT_LED2 10 - -#undef CTRL_LED1 -#define CTRL_LED1 6 -#undef CTRL_LED2 -#define CTRL_LED2 9 - -#undef ALT_LED1 -#define ALT_LED1 7 -#undef GUI_LED1 -#define GUI_LED1 8 diff --git a/keyboards/keebio/iris/keymaps/drashna_old/keymap.c b/keyboards/keebio/iris/keymaps/drashna_old/keymap.c deleted file mode 100644 index ff7bd09c0c..0000000000 --- a/keyboards/keebio/iris/keymaps/drashna_old/keymap.c +++ /dev/null @@ -1 +0,0 @@ -// placeholder diff --git a/keyboards/keebio/iris/keymaps/drashna_old/rules.mk b/keyboards/keebio/iris/keymaps/drashna_old/rules.mk deleted file mode 100644 index 73f37c6c55..0000000000 --- a/keyboards/keebio/iris/keymaps/drashna_old/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -USER_NAME := drashna -SRC += ../drashna/keymap.c - -include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/config.h b/keyboards/keebio/viterbi/keymaps/drashna_old/config.h deleted file mode 100644 index 5697f7f110..0000000000 --- a/keyboards/keebio/viterbi/keymaps/drashna_old/config.h +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2017 Danny Nguyen <danny@hexwire.com> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#include "../drashna/config.h" - -#ifdef RGBLIGHT_ENABLE -# undef RGBLED_NUM -# define RGBLED_NUM 12 -#endif diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c deleted file mode 100644 index 2d361da9a3..0000000000 --- a/keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c +++ /dev/null @@ -1 +0,0 @@ -//placeholder
\ No newline at end of file diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk deleted file mode 100644 index 73f37c6c55..0000000000 --- a/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -USER_NAME := drashna -SRC += ../drashna/keymap.c - -include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk diff --git a/keyboards/moonlander/keymaps/drashna/keymap.c b/keyboards/moonlander/keymaps/drashna/keymap.c index 57c69df480..f6af7e53af 100644 --- a/keyboards/moonlander/keymaps/drashna/keymap.c +++ b/keyboards/moonlander/keymaps/drashna/keymap.c @@ -39,68 +39,32 @@ enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE }; KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT \ ) -#define LAYOUT_moonlander_base_wrapper(...) LAYOUT_moonlander_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_moonlander_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_moonlander_base_wrapper( + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), - [_COLEMAK] = LAYOUT_moonlander_base_wrapper( + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_moonlander_base_wrapper( + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_moonlander_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_moonlander_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_moonlander_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_moonlander_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_moonlander_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - -#ifdef _MODS - [_MODS] = LAYOUT_moonlander_wrapper( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, - _______, KC_MEH, KC_HYPR, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LALT, _______, _______, _______, _______, KC_RGUI - ), -#endif [_GAMEPAD] = LAYOUT_moonlander_wrapper( KC_ESC, KC_NO, KC_1, KC_2, KC_3, KC_4, HYPR(KC_Q), KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, @@ -214,29 +178,17 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (userspace_config.rgb_layer_change) { switch (get_highest_layer(layer_state|default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_1: + rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_2: + rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_3: + rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_4: + rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 643a5b6b0b..b7d83a5f2e 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -19,59 +19,34 @@ LALT_T(KC_TAB), K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(K1B), \ 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 \ ) -#define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), - [_QWERTY] = LAYOUT_orthodox_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - - [_COLEMAK] = LAYOUT_orthodox_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), - - [_DVORAK] = LAYOUT_orthodox_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_WORKMAN] = LAYOUT_orthodox_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_orthodox_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_orthodox_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_orthodox_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_orthodox_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), [_LOWER] = LAYOUT_wrapper(\ KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, diff --git a/keyboards/ploopyco/mouse/keymaps/drashna/config.h b/keyboards/ploopyco/mouse/keymaps/drashna/config.h index 5bc704fec1..5a220c801c 100644 --- a/keyboards/ploopyco/mouse/keymaps/drashna/config.h +++ b/keyboards/ploopyco/mouse/keymaps/drashna/config.h @@ -20,5 +20,10 @@ #undef RGBLIGHT_LIMIT_VAL #define RGBLIGHT_LIMIT_VAL 255 -#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_TWINKLE #define RGBLIGHT_SLEEP diff --git a/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c b/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c index 68b846f7ba..a9b1c46fcb 100644 --- a/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c +++ b/keyboards/ploopyco/mouse/keymaps/drashna/keymap.c @@ -29,6 +29,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void eeconkfig_init_user(void) { rgblight_enable(); +#ifdef RGBLIGHT_EFFECT_TWINKLE rgblight_mode(RGBLIGHT_MODE_TWINKLE+5); +#else + rgblight_mode(RGBLIGHT_MODE_BREATHING+5); +#endif rgblight_sethsv(HSV_MAGENTA); } diff --git a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c index 14287d0ec6..d55110e977 100644 --- a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c @@ -38,58 +38,32 @@ KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ ) /* Re-pass though to allow templates to be used */ -#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_kyria_base_wrapper( + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ ), - [_COLEMAK] = LAYOUT_kyria_base_wrapper( + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ ), - [_DVORAK] = LAYOUT_kyria_base_wrapper( + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ ), - [_WORKMAN] = LAYOUT_kyria_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_kyria_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_kyria_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_kyria_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_kyria_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), - [_GAMEPAD] = LAYOUT_wrapper( KC_ESC, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, @@ -128,6 +102,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ // ), }; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_DEFAULT_LAYER_1] = { { KC_DOWN, KC_UP }, { KC_VOLD, KC_VOLU } }, + [_DEFAULT_LAYER_2] = { { _______, _______ }, { _______, _______ } }, + [_DEFAULT_LAYER_3] = { { _______, _______ }, { _______, _______ } }, + [_DEFAULT_LAYER_4] = { { _______, _______ }, { _______, _______ } }, + [_GAMEPAD] = { { _______, _______ }, { _______, _______ } }, + [_DIABLO] = { { _______, _______ }, { _______, _______ } }, + [_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } }, + [_MEDIA] = { { _______, _______ }, { _______, _______ } }, + [_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } }, + [_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } }, + [_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } }, +}; +#endif // clang-format on #ifdef OLED_DRIVER_ENABLE @@ -156,39 +146,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif #ifdef RGBLIGHT_LAYERS -const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS( - { 8, 1, 120, 255, 255}, - { 18, 1, 120, 255, 255} -); -const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS( - { 6, 1, 0, 255, 255}, - { 16, 1, 0, 255, 255} -); -const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS( - { 2, 1, 240, 255, 255}, - { 17, 1, 250, 255, 255} -); -const rgblight_segment_t PROGMEM gui_layers[] = RGBLIGHT_LAYER_SEGMENTS( - { 7, 1, 51, 255, 255}, - { 12, 1, 51, 255, 255} -); +const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS({8, 1, 120, 255, 255}, {18, 1, 120, 255, 255}); +const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS({6, 1, 0, 255, 255}, {16, 1, 0, 255, 255}); +const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS({2, 1, 240, 255, 255}, {17, 1, 250, 255, 255}); +const rgblight_segment_t PROGMEM gui_layers[] = RGBLIGHT_LAYER_SEGMENTS({7, 1, 51, 255, 255}, {12, 1, 51, 255, 255}); -const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( - shift_layers, - control_layers, - alt_layers, - gui_layers -); +const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(shift_layers, control_layers, alt_layers, gui_layers); -void keyboard_post_init_keymap(void) { - rgblight_layers = my_rgb_layers; -} +void keyboard_post_init_keymap(void) { rgblight_layers = my_rgb_layers; } void matrix_scan_keymap(void) { - uint8_t mods = mod_config(get_mods()|get_oneshot_mods()); - rgblight_set_layer_state(0, mods & MOD_MASK_SHIFT); - rgblight_set_layer_state(1, mods & MOD_MASK_CTRL); - rgblight_set_layer_state(2, mods & MOD_MASK_ALT); - rgblight_set_layer_state(3, mods & MOD_MASK_GUI); + uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); + rgblight_set_layer_state(0, mods & MOD_MASK_SHIFT); + rgblight_set_layer_state(1, mods & MOD_MASK_CTRL); + rgblight_set_layer_state(2, mods & MOD_MASK_ALT); + rgblight_set_layer_state(3, mods & MOD_MASK_GUI); } #endif diff --git a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk index 4036f91453..91d10f5dd2 100644 --- a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk +++ b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk @@ -3,13 +3,15 @@ ENCODER_ENABLE = yes # ENables the use of one or more encoders RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow RGBLIGHT_STARTUP_ANIMATION = no -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # USB Nkey Rollover -UNICODE_ENABLE = yes # Unicode -BOOTLOADER = atmel-dfu +UNICODE_ENABLE = no # Unicode +KEY_LOCK_ENABLE = no + +BOOTLOADER = atmel-dfu # TAP_DANCE_ENABLE = yes diff --git a/keyboards/splitkb/zima/keymaps/drashna/keymap.c b/keyboards/splitkb/zima/keymaps/drashna/keymap.c index d9e1f44e29..6e198e3ddd 100644 --- a/keyboards/splitkb/zima/keymaps/drashna/keymap.c +++ b/keyboards/splitkb/zima/keymaps/drashna/keymap.c @@ -22,6 +22,7 @@ extern haptic_config_t haptic_config; #endif +// clang-format off const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_ortho_4x3( /* Base */ KC_MUTE, TG(1), TG(2), @@ -43,12 +44,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { { KC_DOWN, KC_UP } }, + [1] = { { KC_VOLD, KC_VOLU } }, + [2] = { { RGB_MOD, RGB_RMOD} }, +}; +#endif +// clang-format on -static bool is_asleep = false; +static bool is_asleep = false; static uint32_t oled_timer; void render_oled_logo(void) { - // clang-format off + // clang-format off static const char PROGMEM qmk_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, @@ -68,9 +77,7 @@ void render_user_status(void) { oled_write_P(nukem_good[0], haptic_config.enable); } -void keyboard_post_init_user(void) { - oled_scroll_set_speed(0); -} +void keyboard_post_init_user(void) { oled_scroll_set_speed(0); } void oled_task_user(void) { if (is_asleep) { @@ -107,13 +114,9 @@ void oled_task_user(void) { } } -void suspend_power_down_user(void) { - is_asleep = true; -} +void suspend_power_down_user(void) { is_asleep = true; } -void suspend_wakeup_init_user(void) { - is_asleep = false; -} +void suspend_wakeup_init_user(void) { is_asleep = false; } bool process_record_user(uint16_t keycode, keyrecord_t* record) { oled_timer = timer_read32(); @@ -121,7 +124,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t* record) { return true; } - bool encoder_update_user(uint8_t index, bool clockwise) { if (clockwise) { tap_code16(KC_VOLU); diff --git a/keyboards/splitkb/zima/keymaps/drashna/rules.mk b/keyboards/splitkb/zima/keymaps/drashna/rules.mk index b9a1f7f256..b9dc009159 100644 --- a/keyboards/splitkb/zima/keymaps/drashna/rules.mk +++ b/keyboards/splitkb/zima/keymaps/drashna/rules.mk @@ -1,2 +1,3 @@ # is intentional. won't compile under size, otherwise. USER_NAME := not_drashna +ENCODER_MAP_ENABLE = yes diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index 600e29020d..430328fed7 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -56,145 +56,33 @@ bool skip_leds = false; KC_SPC, LT(_LOWER, KC_BSPC), OS_LWR, OS_RSE, LT(_RAISE, KC_DEL), KC_ENT \ ) -#define LAYOUT_ergodox_pretty_base_wrapper(...) LAYOUT_ergodox_pretty_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_ergodox_pretty_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: QWERTY Layer - * - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = + | 1 ! | 2 @ | 3 # | 4 $ | 5 % | TG(4)| | TG(4)| 6 ^ | 7 & | 8 * | 9 ( | 0 ) | - _ | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | TAB | Q | W | E | R | T | TG(3)| |TG(3) | Y | U | I | O | P | \ | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Bksp | A | S | D | F | G |------| |------| H | J | K | L | ; | ' " | - * |--------+------+------+------+------+------| TG(2)| | TG(2)|------+------+------+------+------+--------| - * | Shift | Z | X | C | V | B | | | | N | M | , < | . > | ? / | Shift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | - * `----------------------------------' `----------------------------------' - * ,--------------. ,--------------. - * |Alt/Ap| Win | | Alt |Ctl/Esc| - * ,------|------|-------| |------+-------+------. - * | | | Home | | PgUp | | | - * | Space| Bksp |-------| |------| DEL |Enter | - * | | | End | | PgDn | | | - * `---------------------' `---------------------' - */ - [_QWERTY] = LAYOUT_ergodox_pretty_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), -/* Keymap 0: COLEMAK layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | F | P | G | L1 | | L1 | J | L | U | Y | ; | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | R | S | T | D |------| |------| H | N | E | I |O / L2| ' | - * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | K | M | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* - [_COLEMAK] = LAYOUT_ergodox_pretty_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), -/* Keymap 0: DVORAK Layout - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | \ | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | ' | , | . | P | Y | L1 | | L1 | F | G | C | R | L | / | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | O | E | U | I |------| |------| D | H | T | N |S / L2| - | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |:/Ctrl| Q | J | K | X | | | | B | M | W | V |Z/Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* - [_DVORAK] = LAYOUT_ergodox_pretty_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), -/* Keymap 0: WORKMAN layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | D | R | W | B | L1 | | L1 | J | F | U | P | ; | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | H | T | D |------| |------| Y | N | E | O | I | ' | - * |--------+------+------+------+------+------| OVER | | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | M | C | V | | | | K | L | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | `/SYM| MEH | LGUI | [ { | ] } | | LEFT | DOWN | UP |RIGHT | SYMB | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|Backsp|------| |------| Tab |Enter | - * | |ace | End | | PgDn | | | - * `--------------------' `----------------------' - */ - - [_WORKMAN] = LAYOUT_ergodox_pretty_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_ergodox_pretty_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_ergodox_pretty_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_ergodox_pretty_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_ergodox_pretty_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), /* Keymap 4: Customized Overwatch Layout * @@ -311,9 +199,7 @@ void keyboard_post_init_keymap(void) { // trackball_set_precision(1.5); trackball_set_rgbw(RGB_MAGENTA, 0x00); } -void shutdown_keymap(void) { - trackball_set_rgbw(RGB_RED, 0x00); -} +void shutdown_keymap(void) { trackball_set_rgbw(RGB_RED, 0x00); } static bool mouse_button_one, trackball_button_one; @@ -328,8 +214,6 @@ void trackball_register_button(bool pressed, enum mouse_buttons button) { } #endif - - bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_1: @@ -371,17 +255,17 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } run_trackball_cleanup(); break; -#if !defined(MOUSEKEY_ENABLE) - case KC_MS_BTN1: - mouse_button_one = record->event.pressed; - trackball_register_button(mouse_button_one | trackball_button_one, MOUSE_BTN1); - break; - case KC_MS_BTN2: - trackball_register_button(record->event.pressed, MOUSE_BTN2); - break; - case KC_MS_BTN3: - trackball_register_button(record->event.pressed, MOUSE_BTN3); - break; +# if !defined(MOUSEKEY_ENABLE) + case KC_MS_BTN1: + mouse_button_one = record->event.pressed; + trackball_register_button(mouse_button_one | trackball_button_one, MOUSE_BTN1); + break; + case KC_MS_BTN2: + trackball_register_button(record->event.pressed, MOUSE_BTN2); + break; + case KC_MS_BTN3: + trackball_register_button(record->event.pressed, MOUSE_BTN3); + break; # endif #endif } @@ -434,7 +318,6 @@ void suspend_power_down_keymap(void) { rgb_matrix_set_suspend_state(true); } void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - if (layer_state_is(_GAMEPAD)) { RGB_MATRIX_INDICATOR_SET_COLOR(32, 0x00, 0xFF, 0x00); // Q RGB_MATRIX_INDICATOR_SET_COLOR(31, 0x00, 0xFF, 0xFF); // W @@ -447,7 +330,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { RGB_MATRIX_INDICATOR_SET_COLOR((userspace_config.swapped_numbers ? 26 : 27), 0xFF, 0xFF, 0xFF); // 1 RGB_MATRIX_INDICATOR_SET_COLOR((userspace_config.swapped_numbers ? 27 : 26), 0x00, 0xFF, 0x00); // 2 - RGB_MATRIX_INDICATOR_SET_COLOR(25, 0x7A, 0x00, 0xFF); // 3 + RGB_MATRIX_INDICATOR_SET_COLOR(25, 0x7A, 0x00, 0xFF); // 3 } # if defined(RGBLIGHT_ENABLE) @@ -456,7 +339,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { if (userspace_config.rgb_layer_change) # endif { - switch (get_highest_layer(layer_state|default_layer_state)) { + switch (get_highest_layer(layer_state | default_layer_state)) { case _GAMEPAD: rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; @@ -472,29 +355,17 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { case _ADJUST: rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_1: + rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_2: + rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_3: + rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + case _DEFAULT_LAYER_4: + rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; } } diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c index 1384221b5f..9ef2317f44 100644 --- a/layouts/community/ortho_4x12/drashna/keymap.c +++ b/layouts/community/ortho_4x12/drashna/keymap.c @@ -16,7 +16,6 @@ #include "drashna.h" - #ifdef BACKLIGHT_ENABLE enum planck_keycodes { BACKLIT = NEW_SAFE_RANGE, @@ -62,58 +61,32 @@ enum planck_keycodes { KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \ BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ) -#define LAYOUT_ortho_4x12_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT_ortho_4x12_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - - [_COLEMAK] = LAYOUT_ortho_4x12_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), - - [_DVORAK] = LAYOUT_ortho_4x12_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_WORKMAN] = LAYOUT_ortho_4x12_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_ortho_4x12_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_ortho_4x12_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_ortho_4x12_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_ortho_4x12_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), [_LOWER] = LAYOUT_ortho_4x12_wrapper( KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, @@ -137,6 +110,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; + +#ifdef ENCODER_MAP_ENABLE +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [_DEFAULT_LAYER_1] = { { KC_DOWN, KC_UP } }, + [_DEFAULT_LAYER_2] = { { _______, _______ } }, + [_DEFAULT_LAYER_3] = { { _______, _______ } }, + [_DEFAULT_LAYER_4] = { { _______, _______ } }, + [_GAMEPAD] = { { _______, _______ } }, + [_DIABLO] = { { _______, _______ } }, + [_MOUSE] = { { KC_WH_D, KC_WH_U } }, + [_MEDIA] = { { _______, _______ } }, + [_RAISE] = { { KC_VOLD, KC_VOLU } }, + [_LOWER] = { { RGB_MOD, RGB_RMOD} }, + [_ADJUST] = { { CK_DOWN, CK_UP } }, +}; +#endif // clang-format on bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { @@ -222,7 +211,6 @@ void suspend_wakeup_init_keymap(void) { } // clang-format on - void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { uint8_t this_mod = get_mods(); uint8_t this_led = host_keyboard_leds(); @@ -254,49 +242,38 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { case _ADJUST: rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); break; - default: { - switch (get_highest_layer(default_layer_state)) { - case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; - case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); - break; + default: + { + switch (get_highest_layer(default_layer_state)) { + case _DEFAULT_LAYER_1: + rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + break; + case _DEFAULT_LAYER_2: + rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + break; + case _DEFAULT_LAYER_3: + rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + break; + case _DEFAULT_LAYER_4: + rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, 0, rgb_matrix_config.speed, LED_FLAG_MODIFIER, led_min, led_max); + break; + } + break; } - break; - } } } switch (get_highest_layer(default_layer_state)) { - case _QWERTY: + case _DEFAULT_LAYER_1: RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0xFF); break; - case _COLEMAK: + case _DEFAULT_LAYER_2: RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xFF, 0x00, 0xFF); break; - case _DVORAK: + case _DEFAULT_LAYER_3: RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0x00, 0xFF, 0x00); break; - case _WORKMAN: + case _DEFAULT_LAYER_4: RGB_MATRIX_INDICATOR_SET_COLOR((is_ez ? 41 : 42), 0xD9, 0xA5, 0x21); break; } diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk index 06a250ee79..e78d073ae3 100644 --- a/layouts/community/ortho_4x12/drashna/rules.mk +++ b/layouts/community/ortho_4x12/drashna/rules.mk @@ -22,6 +22,7 @@ else RGB_MATRIX_ENABLE = no AUDIO_ENABLE = yes EEPROM_DRIVER = i2c + ENCODER_MAP_ENABLE = yes endif ifeq ($(strip $(KEYBOARD)), planck/light) RGB_MATRIX_ENABLE = yes @@ -31,13 +32,14 @@ ifeq ($(strip $(KEYBOARD)), planck/light) # HAPTIC_ENABLE += SOLENOID endif ifeq ($(strip $(KEYBOARD)), planck/ez) - RGBLIGHT_ENABLE = no - ENCODER_ENABLE = yes - RGB_MATRIX_ENABLE = yes + RGBLIGHT_ENABLE = no + ENCODER_ENABLE = yes + ENCODER_MAP_ENABLE = yes + RGB_MATRIX_ENABLE = yes INDICATOR_LIGHTS = yes RGBLIGHT_TWINKLE = yes RGBLIGHT_STARTUP_ANIMATION = yes - CONSOLE_ENABLE = yes - COMMAND_ENABLE = yes - AUDIO_ENABLE = yes + CONSOLE_ENABLE = yes + COMMAND_ENABLE = yes + AUDIO_ENABLE = yes endif diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c index f882ead171..01b06d627d 100644 --- a/layouts/community/ortho_5x12/drashna/keymap.c +++ b/layouts/community/ortho_5x12/drashna/keymap.c @@ -38,34 +38,32 @@ KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ) -#define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), -[_QWERTY] = LAYOUT_ortho_5x12_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ -), - -[_COLEMAK] = LAYOUT_ortho_5x12_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ -), + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), -[_DVORAK] = LAYOUT_ortho_5x12_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ -), - -[_WORKMAN] = LAYOUT_ortho_5x12_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ -), + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), /* Lower * ,-----------------------------------------------------------------------------------. diff --git a/layouts/community/split_3x6_3/drashna/config.h b/layouts/community/split_3x6_3/drashna/config.h index 4a094e1954..b86448c671 100644 --- a/layouts/community/split_3x6_3/drashna/config.h +++ b/layouts/community/split_3x6_3/drashna/config.h @@ -50,11 +50,13 @@ # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended // # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) // # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -# define RGB_MATRIX_HUE_STEP 8 -# define RGB_MATRIX_SAT_STEP 8 -# define RGB_MATRIX_VAL_STEP 5 -# define RGB_MATRIX_SPD_STEP 10 +# ifndef RGB_MATRIX_MAXIMUM_BRIGHTNESS +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +# endif +# define RGB_MATRIX_HUE_STEP 8 +# define RGB_MATRIX_SAT_STEP 8 +# define RGB_MATRIX_VAL_STEP 5 +# define RGB_MATRIX_SPD_STEP 10 #endif #ifdef CONVERT_TO_PROTON_C diff --git a/layouts/community/split_3x6_3/drashna/keymap.c b/layouts/community/split_3x6_3/drashna/keymap.c index e46b626ef9..0840fc2628 100644 --- a/layouts/community/split_3x6_3/drashna/keymap.c +++ b/layouts/community/split_3x6_3/drashna/keymap.c @@ -39,56 +39,32 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE }; OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ RGB_MOD, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ ) -#define LAYOUT_split_3x6_3_base_wrapper(...) LAYOUT_split_3x6_3_base(__VA_ARGS__) +#define LAYOUT_base_wrapper(...) LAYOUT_split_3x6_3_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = LAYOUT_split_3x6_3_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ - ), - - [_COLEMAK] = LAYOUT_split_3x6_3_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ - ), - - [_DVORAK] = LAYOUT_split_3x6_3_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ - ), - - [_WORKMAN] = LAYOUT_split_3x6_3_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ - ), - - [_NORMAN] = LAYOUT_split_3x6_3_base_wrapper( - _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, - _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, - _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ - ), - - [_MALTRON] = LAYOUT_split_3x6_3_base_wrapper( - _________________MALTRON_L1________________, _________________MALTRON_R1________________, - _________________MALTRON_L2________________, _________________MALTRON_R2________________, - _________________MALTRON_L3________________, _________________MALTRON_R3________________ - ), - - [_EUCALYN] = LAYOUT_split_3x6_3_base_wrapper( - _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, - _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, - _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ - ), - - [_CARPLAX] = LAYOUT_split_3x6_3_base_wrapper( - _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, - _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, - _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ - ), + [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( + ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, + ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, + ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ + ), + + [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), [_LOWER] = LAYOUT_split_3x6_3_wrapper( KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, @@ -114,9 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on #ifdef OLED_DRIVER_ENABLE -oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { - return OLED_ROTATION_270; -} +oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return OLED_ROTATION_270; } #endif #ifdef TAPPING_TERM_PER_KEY @@ -130,7 +104,6 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { } #endif - void matrix_slave_scan_user(void) { #ifdef RGB_MATRIX_ENABLE rgb_matrix_task(); @@ -145,28 +118,16 @@ void suspend_wakeup_init_keymap(void) { rgb_matrix_set_suspend_state(false); } void check_default_layer(uint8_t mode, uint8_t type, uint8_t led_min, uint8_t led_max) { switch (get_highest_layer(default_layer_state)) { case _QWERTY: - rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type, led_min, led_max); + rgb_matrix_layer_helper(DEFAULT_LAYER_1_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); + break; + case _COLEMAK_DH: + rgb_matrix_layer_helper(DEFAULT_LAYER_2_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); break; case _COLEMAK: - rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type, led_min, led_max); + rgb_matrix_layer_helper(DEFAULT_LAYER_3_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); break; case _DVORAK: - rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type, led_min, led_max); - break; - case _WORKMAN: - rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type, led_min, led_max); - break; - case _NORMAN: - rgb_matrix_layer_helper(HSV_CORAL, mode, rgb_matrix_config.speed, type, led_min, led_max); - break; - case _MALTRON: - rgb_matrix_layer_helper(HSV_YELLOW, mode, rgb_matrix_config.speed, type, led_min, led_max); - break; - case _EUCALYN: - rgb_matrix_layer_helper(HSV_PINK, mode, rgb_matrix_config.speed, type, led_min, led_max); - break; - case _CARPLAX: - rgb_matrix_layer_helper(HSV_BLUE, mode, rgb_matrix_config.speed, type, led_min, led_max); + rgb_matrix_layer_helper(DEFAULT_LAYER_4_HSV, mode, rgb_matrix_config.speed, type, led_min, led_max); break; } } @@ -189,10 +150,11 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { case _ADJUST: rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW, led_min, led_max); break; - default: { - check_default_layer(0, LED_FLAG_UNDERGLOW, led_min, led_max); - break; - } + default: + { + check_default_layer(0, LED_FLAG_UNDERGLOW, led_min, led_max); + break; + } } check_default_layer(0, LED_FLAG_MODIFIER, led_min, led_max); } diff --git a/users/drashna/config.h b/users/drashna/config.h index 445e180825..fbba210e7a 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -57,26 +57,35 @@ # define UNICODE_SONG_BSD SONG(WORKMAN_SOUND) # define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND) # endif -#endif // !AUDIO_ENABLE +#endif // !AUDIO_ENABLE #define UNICODE_SELECTED_MODES UC_WIN, UC_MAC #ifdef RGBLIGHT_ENABLE # define RGBLIGHT_SLEEP +# undef RGBLIGHT_ANIMATIONS # if defined(__AVR__) && !defined(__AVR_AT90USB1286__) -# undef RGBLIGHT_ANIMATIONS # define RGBLIGHT_EFFECT_BREATHING # define RGBLIGHT_EFFECT_SNAKE # define RGBLIGHT_EFFECT_KNIGHT # else -# define RGBLIGHT_ANIMATIONS +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT +// # define RGBLIGHT_EFFECT_CHRISTMAS +// # define RGBLIGHT_EFFECT_STATIC_GRADIENT +// # define RGBLIGHT_EFFECT_RGB_TEST +// # define RGBLIGHT_EFFECT_ALTERNATING +# define RGBLIGHT_EFFECT_TWINKLE # endif # define RGBLIGHT_EFFECT_TWINKLE_LIFE 250 # define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 24 -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) // # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects @@ -120,8 +129,8 @@ # define DISABLE_RGB_MATRIX_MULTISPLASH # define DISABLE_RGB_MATRIX_SOLID_SPLASH # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# endif // AVR -#endif // RGB_MATRIX_ENABLE +# endif // AVR +#endif // RGB_MATRIX_ENABLE #ifdef OLED_DRIVER_ENABLE # ifdef SPLIT_KEYBOARD @@ -148,16 +157,16 @@ #ifndef ONESHOT_TAP_TOGGLE # define ONESHOT_TAP_TOGGLE 2 -#endif // !ONESHOT_TAP_TOGGLE +#endif // !ONESHOT_TAP_TOGGLE #ifndef ONESHOT_TIMEOUT # define ONESHOT_TIMEOUT 3000 -#endif // !ONESHOT_TIMEOUT +#endif // !ONESHOT_TIMEOUT #ifdef QMK_KEYS_PER_SCAN # undef QMK_KEYS_PER_SCAN # define QMK_KEYS_PER_SCAN 2 -#endif // !QMK_KEYS_PER_SCAN +#endif // !QMK_KEYS_PER_SCAN // this makes it possible to do rolling combos (zx) with keys that // convert to other keys on hold (z becomes ctrl when you hold it, @@ -167,7 +176,7 @@ #undef PERMISSIVE_HOLD //#define TAPPING_FORCE_HOLD_PER_KEY //#define RETRO_TAPPING_PER_KEY -#ifndef KEYBOARD_kyria_rev1 +#if !defined(KEYBOARD_kyria) && !defined(KEYBOARD_splitkb_kyria) # define TAPPING_TERM_PER_KEY #endif @@ -179,7 +188,7 @@ #ifdef TAPPING_TERM # undef TAPPING_TERM -#endif // TAPPING_TERM +#endif // TAPPING_TERM #if defined(KEYBOARD_ergodox_ez) # define TAPPING_TERM 185 #elif defined(KEYBOARD_crkbd) @@ -293,4 +302,4 @@ # ifndef MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS # define MOUSEKEY_WHEEL_DECELERATED_MOVEMENTS 8 # endif -#endif // MOUSEKEY_ENABLE +#endif // MOUSEKEY_ENABLE diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c index b54d0cfcc0..4cef5433d6 100644 --- a/users/drashna/drashna.c +++ b/users/drashna/drashna.c @@ -103,12 +103,12 @@ void shutdown_user(void) { rgblight_enable_noeeprom(); rgblight_mode_noeeprom(1); rgblight_setrgb_red(); -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE rgb_matrix_set_color_all(0xFF, 0x00, 0x00); rgb_matrix_update_pwm_buffers(); -#endif // RGB_MATRIX_ENABLE +#endif // RGB_MATRIX_ENABLE shutdown_keymap(); } @@ -124,8 +124,12 @@ void suspend_power_down_user(void) { __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} void suspend_wakeup_init_user(void) { - if (layer_state_is(_GAMEPAD)) { layer_off(_GAMEPAD); } - if (layer_state_is(_DIABLO)) { layer_off(_DIABLO); } + if (layer_state_is(_GAMEPAD)) { + layer_off(_GAMEPAD); + } + if (layer_state_is(_DIABLO)) { + layer_off(_DIABLO); + } suspend_wakeup_init_keymap(); } @@ -142,13 +146,13 @@ void matrix_scan_user(void) { startup_user(); } -#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. +#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. run_diablo_macro_check(); -#endif // TAP_DANCE_ENABLE +#endif // TAP_DANCE_ENABLE #if defined(RGBLIGHT_ENABLE) matrix_scan_rgb_light(); -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #if defined(RGB_MATRIX_ENABLE) matrix_scan_rgb_matrix(); #endif @@ -167,13 +171,15 @@ __attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) // on layer change, no matter where the change was initiated // Then runs keymap's layer change check layer_state_t layer_state_set_user(layer_state_t state) { - if (!is_keyboard_master()) { return state; } + if (!is_keyboard_master()) { + return state; + } state = layer_state_set_keymap(state); state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST); #if defined(RGBLIGHT_ENABLE) state = layer_state_set_rgb_light(state); -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #if defined(AUDIO_ENABLE) && !defined(__arm__) static bool is_gamepad_on = false; if (layer_state_cmp(state, _GAMEPAD) != is_gamepad_on) { @@ -192,13 +198,15 @@ __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t // Runs state check and changes underglow color and animation layer_state_t default_layer_state_set_user(layer_state_t state) { - if (!is_keyboard_master()) { return state; } + if (!is_keyboard_master()) { + return state; + } state = default_layer_state_set_keymap(state); #if 0 # if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) state = default_layer_state_set_rgb(state); -# endif // RGBLIGHT_ENABLE +# endif // RGBLIGHT_ENABLE #endif return state; } diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h index f1d756f742..ca849b0509 100644 --- a/users/drashna/drashna.h +++ b/users/drashna/drashna.h @@ -22,7 +22,7 @@ #include "process_records.h" #ifdef TAP_DANCE_ENABLE # include "tap_dances.h" -#endif // TAP_DANCE_ENABLE +#endif // TAP_DANCE_ENABLE #if defined(RGBLIGHT_ENABLE) # include "rgb_stuff.h" #endif @@ -41,25 +41,44 @@ /* Define layer names */ enum userspace_layers { - _QWERTY = 0, - _NUMLOCK = 0, + _QWERTY = 0, + _NUMLOCK = 0, + FIRST_DEFAULT_LAYER = 0, + _COLEMAK_DH, _COLEMAK, _DVORAK, - _WORKMAN, - _NORMAN, - _MALTRON, - _EUCALYN, - _CARPLAX, + LAST_DEFAULT_LAYER = _DVORAK, _GAMEPAD, _DIABLO, - _MACROS, + _MOUSE, _MEDIA, _LOWER, _RAISE, _ADJUST, }; -#define _MOUSE _MACROS +#define _MACROS _MOUSE +#define _DEFAULT_LAYER_1 FIRST_DEFAULT_LAYER +#define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 1) +#define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 2) +#define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 3) +#if LAST_DEFAULT_LAYER > (FIRST_DEFAULT_LAYER + 3) +# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 4) +# define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 5) +# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 6) +# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 7) +# if LAST_DEFAULT_LAYER > (FIRST_DEFAULT_LAYER + 7) +# define _DEFAULT_LAYER_2 (FIRST_DEFAULT_LAYER + 8) +# define _DEFAULT_LAYER_3 (FIRST_DEFAULT_LAYER + 9) +# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 10) +# define _DEFAULT_LAYER_4 (FIRST_DEFAULT_LAYER + 11) +# endif +#endif + +#define DEFAULT_LAYER_1_HSV HSV_CYAN +#define DEFAULT_LAYER_2_HSV HSV_SPRINGGREEN +#define DEFAULT_LAYER_3_HSV HSV_MAGENTA +#define DEFAULT_LAYER_4_HSV HSV_GOLDENROD bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed); bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer); @@ -101,12 +120,12 @@ We use custom codes here, so we can substitute the right stuff # define KC_D3_2 TD(TD_D3_2) # define KC_D3_3 TD(TD_D3_3) # define KC_D3_4 TD(TD_D3_4) -#else // TAP_DANCE_ENABLE +#else // TAP_DANCE_ENABLE # define KC_D3_1 KC_1 # define KC_D3_2 KC_2 # define KC_D3_3 KC_3 # define KC_D3_4 KC_4 -#endif // TAP_DANCE_ENABLE +#endif // TAP_DANCE_ENABLE #if defined(DRASHNA_CUSTOM_TRANSPORT) && defined(POINTING_DEVICE_ENABLE) void master_mouse_send(int8_t x, int8_t y); diff --git a/users/drashna/drashna_font.h b/users/drashna/drashna_font.h index 46ebf3710a..e9353e62a9 100644 --- a/users/drashna/drashna_font.h +++ b/users/drashna/drashna_font.h @@ -3,7 +3,10 @@ // additional fonts from // https://github.com/datacute/TinyOLED-Fonts -#include "progmem.h" +#if __has_include("../../../../Documents/qmk/oled_font.h") +# include "../../../../Documents/qmk/oled_font.h" +#else +# include "progmem.h" // clang-format off static const unsigned char font[] PROGMEM = { @@ -39,7 +42,7 @@ static const unsigned char font[] PROGMEM = { 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, // 0x1D 29 ↭ 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, // 0x1E 30 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, // 0x1F 31 -#if defined(OLED_FONT_5X5) +# if defined(OLED_FONT_5X5) 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 0x5c,0x00,0x00,0x00,0x00,0x00, // 0x21 33 ! 0x06,0x00,0x06,0x00,0x00,0x00, // 0x22 34 " @@ -136,7 +139,7 @@ static const unsigned char font[] PROGMEM = { 0x44,0x7c,0x10,0x00,0x00,0x00, // 0x7D 125 } 0x02,0x01,0x02,0x01,0x00,0x00, // 0x7E 126 ~ 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 -#elif defined(OLED_FONT_AZTECH) +# lif defined(OLED_FONT_AZTECH) 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 0x00,0x2e,0x00,0x00,0x00,0x00, // 0x21 33 ! 0x00,0x02,0x00,0x02,0x00,0x00, // 0x22 34 " @@ -233,7 +236,7 @@ static const unsigned char font[] PROGMEM = { 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 } 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7E 126 ~ 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 -#elif defined(OLED_FONT_BMPLAIN) +# elif defined(OLED_FONT_BMPLAIN) 0x00,0x00,0x00,0x00,0x00,0x00, // 0x20 32 0x2e,0x00,0x00,0x00,0x00,0x00, // 0x21 33 ! 0x03,0x00,0x03,0x00,0x00,0x00, // 0x22 34 " @@ -330,7 +333,7 @@ static const unsigned char font[] PROGMEM = { 0x22,0x3e,0x08,0x00,0x00,0x00, // 0x7D 125 } 0x01,0x01,0x01,0x00,0x00,0x00, // 0x7E 126 ~ 0x00,0x00,0x00,0x00,0x00,0x00, // 0x7F 127 -#elif defined(OLED_FONT_SUPER_DIGG) +# elif defined(OLED_FONT_SUPER_DIGG) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32 0x58, 0x5C, 0x00, 0x00, 0x00, 0x00, // 0x21 33 ! 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, // 0x22 34 " @@ -427,7 +430,7 @@ static const unsigned char font[] PROGMEM = { 0xC2, 0xFE, 0x10, 0x00, 0x00, 0x00, // 0x7D 125 } 0x02, 0x01, 0x03, 0x04, 0x06, 0x02, // 0x7E 126 ~ 0x3C, 0x22, 0x21, 0x22, 0x3C, 0x00, // 0x7F 127 -#else // default font +# else // default font 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x20 32 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, // 0x21 33 ! 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, // 0x22 34 " @@ -524,9 +527,9 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x41, 0x36, 0x08, 0x00, 0x00, // 0x7D 125 } 0x02, 0x01, 0x02, 0x04, 0x02, 0x00, // 0x7E 126 ~ 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, // 0x7F 127 -#endif +# endif -#if defined(OLED_LOGO_GMK_BAD) +# if defined(OLED_LOGO_GMK_BAD) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 0x80, 0xC0, 0xE0, 0xF0, 0xF0, 0x70, // 0x81 0x38, 0x38, 0x38, 0x78, 0x70, 0xF0, // 0x82 @@ -655,7 +658,7 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - #elif defined(OLED_LOGO_HUE_MANITEE) +# elif defined(OLED_LOGO_HUE_MANITEE) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 0x00, 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x90, 0x70, 0xE8, 0xA8, 0xE4, 0xC4, @@ -784,7 +787,7 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - #elif defined(OLED_LOGO_CORNE) +# elif defined(OLED_LOGO_CORNE) 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xE0, @@ -914,7 +917,7 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -#elif defined(OLED_LOGO_GOTHAM) // see /keyboards/crkbd/keymaps/gotham/oled.c +# elif defined(OLED_LOGO_GOTHAM) // see /keyboards/crkbd/keymaps/gotham/oled.c 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 0x00, 0x00, 0xC0, 0x60, 0x30, 0x18, 0xF8, 0x18, 0x00, 0xC0, 0x70, 0x1C, @@ -1043,137 +1046,7 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - -#elif defined(OLED_LOGO_SCIFI) - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x80, 0x80, 0xC0, 0xC0, 0xE0, 0x60, - 0x70, 0x30, 0x38, 0x18, 0x0C, 0x0C, - 0x1E, 0x0C, 0x80, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0xC0, 0xE0, 0xF0, 0x38, 0x1C, 0x0E, - 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, - 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, - 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x80, 0xC0, - 0xC0, 0x60, 0x60, 0x30, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, - 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, - 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, - 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, - 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, - 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, - 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, - 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x30, 0x30, 0x70, 0x78, 0x78, 0x7C, - 0x7C, 0x7E, 0x3E, 0x3F, 0x3F, 0x3B, - 0x3B, 0x39, 0x39, 0x38, 0x38, 0x38, - 0x38, 0x38, 0x38, 0x38, 0x3C, 0x38, - 0x18, 0x8F, 0xDF, 0xF8, 0x7C, 0xBE, - 0xDF, 0xF7, 0xFB, 0xFD, 0xFE, 0xEF, - 0x73, 0x3B, 0x1B, 0x1F, 0xEF, 0xF7, - 0xFF, 0x7E, 0x6F, 0x6F, 0x6F, 0x6F, - 0x6D, 0xBD, 0xE1, 0xF9, 0x3F, 0x3F, - 0x39, 0x79, 0x79, 0x7D, 0xED, 0xED, - 0xCD, 0xC7, 0xC7, 0x87, 0xC7, 0xE3, - 0xE0, 0xF8, 0x7E, 0x3F, 0x37, 0x33, - 0x3B, 0x1B, 0x19, 0x19, 0x0D, 0xED, - 0xFF, 0xBF, 0xC7, 0xE7, 0xE3, 0xF0, - 0x7C, 0xDE, 0xE7, 0xFB, 0x3E, 0x3F, - 0xFC, 0xE0, 0xF8, 0x3E, 0xCF, 0xF3, - 0xFC, 0x3F, 0x1F, 0x1F, 0x3C, 0x7E, - 0x76, 0xF3, 0xE3, 0x81, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, - 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, - 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, - 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, - 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, - 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, - 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, - 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x20, 0x30, 0x18, 0x1E, - 0x0F, 0x03, 0x01, 0x00, 0x00, 0x00, - 0x01, 0x03, 0x03, 0x01, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x03, 0x07, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x01, 0xE1, 0x79, 0x3E, 0x1F, - 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, - 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, - 0x02, 0x06, 0x04, 0x08, 0x18, 0x10, - 0x30, 0x20, 0x60, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, - 0x00, 0x14, 0x08, 0x14, 0x00, 0x00, - 0x00, 0x1C, 0x1C, 0x3E, 0x7F, 0x7F, - 0x00, 0x22, 0x1C, 0x41, 0x3E, 0x00, - 0x00, 0x00, 0x00, 0x30, 0x18, 0x0C, - 0x06, 0x0C, 0x18, 0x30, 0x00, 0x00, - 0x00, 0x00, 0x06, 0x06, 0x06, 0x0C, - 0x18, 0x30, 0x66, 0x66, 0x66, 0x00, - 0x00, 0x00, 0x00, 0x08, 0x0C, 0x7E, - 0x7F, 0x7E, 0x0C, 0x08, 0x00, 0x00, - 0x00, 0x00, 0x77, 0x77, 0x77, 0x00, - 0x77, 0x77, 0x77, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xE7, 0xA5, 0xFF, 0x24, - 0x24, 0xFF, 0xA5, 0xE7, 0x00, 0x00, - 0x00, 0x00, 0x1C, 0x22, 0xC9, 0xD1, - 0xC9, 0x22, 0x1C, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x02, 0x38, 0xFC, 0xED, - 0xFC, 0x38, 0x02, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x3E, 0x4A, 0x4F, - 0x4A, 0x3E, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x40, 0x60, 0x6A, 0x64, - 0x6A, 0x60, 0x40, 0x00, 0x00, 0x00, - 0x00, 0x04, 0x42, 0x69, 0x65, 0x65, - 0x65, 0x69, 0x42, 0x04, 0x00, 0x00, - 0x00, 0x00, 0x1C, 0x14, 0x1C, 0x08, - 0x18, 0x08, 0x18, 0x00, 0x00, 0x00, - 0x00, 0x70, 0xC8, 0xEE, 0xF9, 0x70, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -#else +# else 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x80 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F, @@ -1303,7 +1176,7 @@ static const unsigned char font[] PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -#endif +# endif }; - // clang-format on +#endif diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c index 253c5181ee..b2f49a2e7e 100644 --- a/users/drashna/oled_stuff.c +++ b/users/drashna/oled_stuff.c @@ -25,7 +25,7 @@ #endif uint32_t oled_timer = 0; -static char keylog_str[KEYLOGGER_LENGTH + 1] = { 0 }; +static char keylog_str[KEYLOGGER_LENGTH + 1] = {0}; static uint16_t log_timer = 0; // clang-format off @@ -58,7 +58,7 @@ void add_keylog(uint16_t keycode) { } for (uint8_t i = 1; i < KEYLOGGER_LENGTH; i++) { - keylog_str[i-1] = keylog_str[i]; + keylog_str[i - 1] = keylog_str[i]; } if (keycode < (sizeof(code_to_name) / sizeof(char))) { @@ -92,14 +92,18 @@ void render_keylogger_status(void) { void render_default_layer_state(void) { oled_write_P(PSTR(OLED_RENDER_LAYOUT_NAME), false); switch (get_highest_layer(default_layer_state)) { - case _QWERTY: oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false); break; - case _COLEMAK: oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false); break; - case _DVORAK: oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false); break; - case _WORKMAN: oled_write_P(PSTR(OLED_RENDER_LAYOUT_WORKMAN), false); break; - case _NORMAN: oled_write_P(PSTR(OLED_RENDER_LAYOUT_NORMAN), false); break; - case _MALTRON: oled_write_P(PSTR(OLED_RENDER_LAYOUT_MALTRON), false); break; - case _EUCALYN: oled_write_P(PSTR(OLED_RENDER_LAYOUT_EUCALYN), false); break; - case _CARPLAX: oled_write_P(PSTR(OLED_RENDER_LAYOUT_CARPLAX), false); break; + case _QWERTY: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false); + break; + case _COLEMAK_DH: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK_DH), false); + break; + case _COLEMAK: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false); + break; + case _DVORAK: + oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false); + break; } #ifdef OLED_DISPLAY_128X64 oled_advance_page(true); @@ -336,8 +340,8 @@ void render_status_secondary(void) { render_default_layer_state(); render_layer_state(); render_mod_status(get_mods() | get_oneshot_mods()); - // render_keylogger_status(); - render_keylock_status(host_keyboard_leds()); + + // render_keylock_status(host_keyboard_leds()); } void render_status_main(void) { @@ -360,7 +364,7 @@ void render_status_main(void) { render_bootmagic_status(); render_user_status(); - render_keylogger_status(); + // render_keylogger_status(); } __attribute__((weak)) oled_rotation_t oled_init_keymap(oled_rotation_t rotation) { return rotation; } @@ -382,8 +386,15 @@ void oled_task_user(void) { } else { oled_on(); } - render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + } + if (is_keyboard_left()) { + render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_status_secondary(); } + if (is_keyboard_master()) { + render_keylogger_status(); + } else { + render_keylock_status(host_keyboard_leds()); + } } diff --git a/users/drashna/oled_stuff.h b/users/drashna/oled_stuff.h index ad9cf09ed2..bba3f39cbc 100644 --- a/users/drashna/oled_stuff.h +++ b/users/drashna/oled_stuff.h @@ -29,6 +29,7 @@ extern uint32_t oled_timer; # define OLED_RENDER_LAYOUT_NAME "Layout: " # define OLED_RENDER_LAYOUT_QWERTY "Qwerty" +# define OLED_RENDER_LAYOUT_COLEMAK_DH "Colemak-DH" # define OLED_RENDER_LAYOUT_COLEMAK "Colemak" # define OLED_RENDER_LAYOUT_DVORAK "Dvorak" # define OLED_RENDER_LAYOUT_WORKMAN "Workman" @@ -73,6 +74,7 @@ extern uint32_t oled_timer; # define OLED_RENDER_LAYOUT_NAME "Lyout" # define OLED_RENDER_LAYOUT_QWERTY " QRTY" +# define OLED_RENDER_LAYOUT_COLEMAK_DH " cmDH" # define OLED_RENDER_LAYOUT_COLEMAK " COLE" # define OLED_RENDER_LAYOUT_DVORAK " DVRK" # define OLED_RENDER_LAYOUT_WORKMAN " WKMN" diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c index 124354a5bc..1e6ecc1d6c 100644 --- a/users/drashna/process_records.c +++ b/users/drashna/process_records.c @@ -29,10 +29,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // If console is enabled, it will print the matrix position and status of each key pressed #ifdef KEYLOGGER_ENABLE uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count); -#endif // KEYLOGGER_ENABLE +#endif // KEYLOGGER_ENABLE #ifdef OLED_DRIVER_ENABLE process_record_user_oled(keycode, record); -#endif // OLED +#endif // OLED if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record) #ifdef RGB_MATRIX_ENABLE @@ -46,20 +46,25 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } switch (keycode) { - case KC_QWERTY ... KC_WORKMAN: + case FIRST_DEFAULT_LAYER_KEYCODE ... LAST_DEFAULT_LAYER_KEYCODE: if (record->event.pressed) { uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); if (!mods) { - set_single_persistent_default_layer(keycode - KC_QWERTY); + set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE); +#if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3) } else if (mods & MOD_MASK_SHIFT) { - set_single_persistent_default_layer(keycode - KC_QWERTY + 4); + set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 4); +# if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7) + } else if (mods & MOD_MASK_CTRL) { - set_single_persistent_default_layer(keycode - KC_QWERTY + 8); + set_single_persistent_default_layer(keycode - FIRST_DEFAULT_LAYER_KEYCODE + 8); +# endif +#endif } } break; - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader + case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader if (!record->event.pressed) { #ifndef MAKE_BOOTLOADER uint8_t temp_mod = mod_config(get_mods()); @@ -79,55 +84,63 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #endif } send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); -#ifdef RGB_MATRIX_SPLIT_RIGHT - send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); -# ifndef OLED_DRIVER_ENABLE - send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); -# endif +#ifdef CONVERT_TO_PROTON_C + send_string_with_delay_P(PSTR(" -e CTPC=yes"), TAP_CODE_DELAY); #endif send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); } - break; - case VRSN: // Prints firmware version - if (record->event.pressed) { send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); } + case VRSN: // Prints firmware version + if (record->event.pressed) { + send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); + } break; - case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them + case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them #ifdef TAP_DANCE_ENABLE if (record->event.pressed) { - for (uint8_t index = 0; index < 4; index++) { diablo_timer[index].key_interval = 0; } + for (uint8_t index = 0; index < 4; index++) { + diablo_timer[index].key_interval = 0; + } } -#endif // TAP_DANCE_ENABLE +#endif // TAP_DANCE_ENABLE break; - case KC_CCCV: // One key copy/paste + case KC_CCCV: // One key copy/paste if (record->event.pressed) { copy_paste_timer = timer_read(); } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy tap_code16(LCTL(KC_C)); - } else { // Tap, paste + } else { // Tap, paste tap_code16(LCTL(KC_V)); } } break; #ifdef UNICODE_ENABLE - case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ - if (record->event.pressed) { send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); } + case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ + if (record->event.pressed) { + send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); + } break; - case UC_TABL: // ┬─┬ノ( º _ ºノ) - if (record->event.pressed) { send_unicode_string("┬─┬ノ( º _ ºノ)"); } + case UC_TABL: // ┬─┬ノ( º _ ºノ) + if (record->event.pressed) { + send_unicode_string("┬─┬ノ( º _ ºノ)"); + } break; - case UC_SHRG: // ¯\_(ツ)_/¯ - if (record->event.pressed) { send_unicode_string("¯\\_(ツ)_/¯"); } + case UC_SHRG: // ¯\_(ツ)_/¯ + if (record->event.pressed) { + send_unicode_string("¯\\_(ツ)_/¯"); + } break; - case UC_DISA: // ಠ_ಠ - if (record->event.pressed) { send_unicode_string("ಠ_ಠ"); } + case UC_DISA: // ಠ_ಠ + if (record->event.pressed) { + send_unicode_string("ಠ_ಠ"); + } break; #endif - case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal + case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) if (record->event.pressed) { userspace_config.rgb_layer_change ^= 1; @@ -137,14 +150,14 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { # if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) rgblight_enable_noeeprom(); # endif - layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) + layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) # if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) } else { rgblight_disable_noeeprom(); # endif } } -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE break; #if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) @@ -164,7 +177,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions if (record->event.pressed) { bool is_eeprom_updated; # if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) @@ -182,7 +195,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { is_eeprom_updated = true; } # endif - if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); } + if (is_eeprom_updated) { + eeconfig_update_user(userspace_config.raw); + } } #endif } diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h index f65cfc03c1..460d41d4df 100644 --- a/users/drashna/process_records.h +++ b/users/drashna/process_records.h @@ -24,51 +24,70 @@ #endif enum userspace_custom_keycodes { - VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info - KC_QWERTY, // Sets default layer to QWERTY - KC_COLEMAK, // Sets default layer to COLEMAK - KC_DVORAK, // Sets default layer to DVORAK - KC_WORKMAN, // Sets default layer to WORKMAN - KC_DIABLO_CLEAR, // Clears all Diablo Timers - KC_MAKE, // Run keyboard's customized make command - KC_RGB_T, // Toggles RGB Layer Indication mode - RGB_IDL, // RGB Idling animations - KC_SECRET_1, // test1 - KC_SECRET_2, // test2 - KC_SECRET_3, // test3 - KC_SECRET_4, // test4 - KC_SECRET_5, // test5 - KC_CCCV, // Hold to copy, tap to paste - KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬─┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ - NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes + VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info + KC_QWERTY, // Sets default layer to QWERTY + FIRST_DEFAULT_LAYER_KEYCODE = KC_QWERTY, // Sets default layer to QWERTY + KC_COLEMAK_DH, // Sets default layer to COLEMAK + KC_COLEMAK, // Sets default layer to COLEMAK + KC_DVORAK, // Sets default layer to DVORAK + LAST_DEFAULT_LAYER_KEYCODE = KC_DVORAK, // Sets default layer to WORKMAN + KC_DIABLO_CLEAR, // Clears all Diablo Timers + KC_MAKE, // Run keyboard's customized make command + KC_RGB_T, // Toggles RGB Layer Indication mode + RGB_IDL, // RGB Idling animations + KC_SECRET_1, // test1 + KC_SECRET_2, // test2 + KC_SECRET_3, // test3 + KC_SECRET_4, // test4 + KC_SECRET_5, // test5 + KC_CCCV, // Hold to copy, tap to paste + KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ + NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes }; bool process_record_secrets(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) -#define ADJUST MO(_ADJUST) -#define TG_MODS OS_TOGG -#define TG_GAME TG(_GAMEPAD) -#define TG_DBLO TG(_DIABLO) -#define OS_LWR OSL(_LOWER) -#define OS_RSE OSL(_RAISE) - -#define KC_SEC1 KC_SECRET_1 -#define KC_SEC2 KC_SECRET_2 -#define KC_SEC3 KC_SECRET_3 -#define KC_SEC4 KC_SECRET_4 -#define KC_SEC5 KC_SECRET_5 - -#define QWERTY KC_QWERTY -#define DVORAK KC_DVORAK -#define COLEMAK KC_COLEMAK -#define WORKMAN KC_WORKMAN +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) +#define TG_MODS OS_TOGG +#define TG_GAME TG(_GAMEPAD) +#define TG_DBLO TG(_DIABLO) +#define OS_LWR OSL(_LOWER) +#define OS_RSE OSL(_RAISE) + +#define KC_SEC1 KC_SECRET_1 +#define KC_SEC2 KC_SECRET_2 +#define KC_SEC3 KC_SECRET_3 +#define KC_SEC4 KC_SECRET_4 +#define KC_SEC5 KC_SECRET_5 + +#define QWERTY KC_QWERTY +#define DVORAK KC_DVORAK +#define COLEMAK KC_COLEMAK +#define COLEMAKDH KC_COLEMAK_DH + +#define DEFLYR1 FIRST_DEFAULT_LAYER_KEYCODE +#define DEFLYR2 (FIRST_DEFAULT_LAYER_KEYCODE + 1) +#define DEFLYR3 (FIRST_DEFAULT_LAYER_KEYCODE + 2) +#define DEFLYR4 (FIRST_DEFAULT_LAYER_KEYCODE + 3) +#if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3) +# define DEFLYR5 (FIRST_DEFAULT_LAYER_KEYCODE + 4) +# define DEFLYR6 (FIRST_DEFAULT_LAYER_KEYCODE + 5) +# define DEFLYR7 (FIRST_DEFAULT_LAYER_KEYCODE + 6) +# define DEFLYR8 (FIRST_DEFAULT_LAYER_KEYCODE + 7) +# if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7) +# define DEFLYR9 (FIRST_DEFAULT_LAYER_KEYCODE + 8) +# define DEFLYR10 (FIRST_DEFAULT_LAYER_KEYCODE + 9) +# define DEFLYR11 (FIRST_DEFAULT_LAYER_KEYCODE + 10) +# define DEFLYR12 (FIRST_DEFAULT_LAYER_KEYCODE + 11) +# endif +#endif #define KC_RESET RESET #define KC_RST KC_RESET @@ -77,9 +96,9 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); # define KC_C1R3 SH_T(KC_TAB) #elif defined(DRASHNA_LP) # define KC_C1R3 TG(_GAMEPAD) -#else // SWAP_HANDS_ENABLE +#else // SWAP_HANDS_ENABLE # define KC_C1R3 KC_TAB -#endif // SWAP_HANDS_ENABLE +#endif // SWAP_HANDS_ENABLE #define BK_LWER LT(_LOWER, KC_BSPC) #define SP_LWER LT(_LOWER, KC_SPC) diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c index 9fbe6214bf..5adbd8ab1b 100644 --- a/users/drashna/rgb_matrix_stuff.c +++ b/users/drashna/rgb_matrix_stuff.c @@ -28,24 +28,30 @@ static uint32_t hypno_timer; void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type, uint8_t led_min, uint8_t led_max) { HSV hsv = {hue, sat, val}; - if (hsv.v > rgb_matrix_get_val()) { hsv.v = rgb_matrix_get_val(); } + if (hsv.v > rgb_matrix_get_val()) { + hsv.v = rgb_matrix_get_val(); + } switch (mode) { - case 1: // breathing + case 1: // breathing { uint16_t time = scale16by8(g_rgb_timer, speed / 8); hsv.v = scale8(abs8(sin8(time) - 128) * 2, hsv.v); RGB rgb = hsv_to_rgb(hsv); for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); } + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); + } } break; } - default: // Solid Color + default: // Solid Color { RGB rgb = hsv_to_rgb(hsv); for (uint8_t i = 0; i < DRIVER_LED_TOTAL; i++) { - if (HAS_FLAGS(g_led_config.flags[i], led_type)) { RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); } + if (HAS_FLAGS(g_led_config.flags[i], led_type)) { + RGB_MATRIX_INDICATOR_SET_COLOR(i, rgb.r, rgb.g, rgb.b); + } } break; } @@ -56,30 +62,38 @@ __attribute__((weak)) void rgb_matrix_indicator_keymap(void) {} void matrix_scan_rgb_matrix(void) { #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && sync_timer_elapsed32(hypno_timer) > 15000) { rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); } + if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && sync_timer_elapsed32(hypno_timer) > 15000) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } #endif rgb_matrix_indicator_keymap(); } void keyboard_post_init_rgb_matrix(void) { #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) - if (userspace_config.rgb_matrix_idle_anim) { rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); } + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE); + } #endif } bool process_record_user_rgb_matrix(uint16_t keycode, keyrecord_t *record) { #if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) hypno_timer = sync_timer_read32(); - if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); } + if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); + } #endif switch (keycode) { - case RGB_IDL: // This allows me to use underglow as layer indication, or as normal + case RGB_IDL: // This allows me to use underglow as layer indication, or as normal #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) if (record->event.pressed) { userspace_config.rgb_matrix_idle_anim ^= 1; dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); eeconfig_update_user(userspace_config.raw); - if (userspace_config.rgb_matrix_idle_anim) { rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); } + if (userspace_config.rgb_matrix_idle_anim) { + rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); + } } #endif break; diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c index 1665638cf1..8a0866539e 100644 --- a/users/drashna/rgb_stuff.c +++ b/users/drashna/rgb_stuff.c @@ -28,7 +28,7 @@ void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight static rgblight_fadeout lights[RGBLED_NUM]; /* Handler for fading/twinkling effect */ -void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive +void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive bool litup = false; for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) { @@ -38,15 +38,21 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgb if (light->life) { light->life -= 1; - if (get_highest_layer(layer_state) == 0) { sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); } + if (get_highest_layer(layer_state) == 0) { + sethsv(light->hue + rand() % 0xF, 255, light->life, (LED_TYPE *)&led[light_index]); + } light->timer = sync_timer_read(); } else { - if (light->enabled && get_highest_layer(layer_state) == 0) { rgblight_sethsv_default_helper(light_index); } + if (light->enabled && get_highest_layer(layer_state) == 0) { + rgblight_sethsv_default_helper(light_index); + } litup = light->enabled = false; } } } - if (litup && get_highest_layer(layer_state) == 0) { rgblight_set(); } + if (litup && get_highest_layer(layer_state) == 0) { + rgblight_set(); + } } /* Triggers a LED to fade/twinkle. @@ -92,7 +98,9 @@ void start_rgb_light(void) { bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) { uint16_t temp_keycode = keycode; // Filter out the actual keycode from MT and LT keys. - if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { temp_keycode &= 0xFF; } + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { + temp_keycode &= 0xFF; + } switch (temp_keycode) { # ifdef RGBLIGHT_TWINKLE @@ -102,9 +110,11 @@ bool process_record_user_rgb_light(uint16_t keycode, keyrecord_t *record) { case KC_KP_SLASH ... KC_KP_DOT: case KC_F13 ... KC_F24: case KC_AUDIO_MUTE ... KC_MEDIA_REWIND: - if (record->event.pressed) { start_rgb_light(); } + if (record->event.pressed) { + start_rgb_light(); + } break; -# endif // RGBLIGHT_TWINKLE +# endif // RGBLIGHT_TWINKLE } return true; } @@ -119,7 +129,9 @@ static uint16_t rgblight_startup_loop_timer; void keyboard_post_init_rgb_light(void) { # if defined(RGBLIGHT_STARTUP_ANIMATION) is_enabled = rgblight_is_enabled(); - if (userspace_config.rgb_layer_change) { rgblight_enable_noeeprom(); } + if (userspace_config.rgb_layer_change) { + rgblight_enable_noeeprom(); + } if (rgblight_is_enabled()) { layer_state_set_rgb_light(layer_state); old_hue = rgblight_get_hue(); @@ -133,7 +145,7 @@ void keyboard_post_init_rgb_light(void) { void matrix_scan_rgb_light(void) { # ifdef RGBLIGHT_TWINKLE scan_rgblight_fadeout(); -# endif // RGBLIGHT_ENABLE +# endif // RGBLIGHT_ENABLE # if defined(RGBLIGHT_STARTUP_ANIMATION) if (is_rgblight_startup && is_keyboard_master()) { @@ -144,8 +156,12 @@ void matrix_scan_rgb_light(void) { rgblight_startup_loop_timer = sync_timer_read(); if (counter == 255) { is_rgblight_startup = false; - if (!is_enabled) { rgblight_disable_noeeprom(); } - if (userspace_config.rgb_layer_change) { layer_state_set_rgb_light(layer_state); } + if (!is_enabled) { + rgblight_disable_noeeprom(); + } + if (userspace_config.rgb_layer_change) { + layer_state_set_rgb_light(layer_state); + } } } } @@ -162,26 +178,48 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) { # ifdef RGBLIGHT_ENABLE if (userspace_config.rgb_layer_change) { switch (get_highest_layer(state | default_layer_state)) { - case _MACROS: // mouse - if (!layer_state_cmp(state, _GAMEPAD) && !layer_state_cmp(state, _DIABLO)) { rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 3); } + case _MOUSE: // mouse + if (!layer_state_cmp(state, _GAMEPAD) && !layer_state_cmp(state, _DIABLO)) { +# if defined(RGBLIGHT_EFFECT_TWINKLE) + rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_TWINKLE + 5); +# else + rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_BREATHING + 3); +# endif + } + break; + case _MEDIA: + rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1); + break; + case _GAMEPAD: + rgblight_set_hsv_and_mode(HSV_ORANGE, RGBLIGHT_MODE_SNAKE + 2); + break; + case _DIABLO: + rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_BREATHING + 3); + break; + case _RAISE: + rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_BREATHING + 3); + break; + case _LOWER: + rgblight_set_hsv_and_mode(HSV_GREEN, RGBLIGHT_MODE_BREATHING + 3); + break; + case _ADJUST: + rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); + break; + case _DEFAULT_LAYER_1: + rgblight_set_hsv_and_mode(DEFAULT_LAYER_1_HSV, RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _DEFAULT_LAYER_2: + rgblight_set_hsv_and_mode(DEFAULT_LAYER_2_HSV, RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _DEFAULT_LAYER_3: + rgblight_set_hsv_and_mode(DEFAULT_LAYER_3_HSV, RGBLIGHT_MODE_STATIC_LIGHT); + break; + case _DEFAULT_LAYER_4: + rgblight_set_hsv_and_mode(DEFAULT_LAYER_4_HSV, RGBLIGHT_MODE_STATIC_LIGHT); break; - case _MEDIA: rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1); break; - case _GAMEPAD: rgblight_set_hsv_and_mode(HSV_ORANGE, RGBLIGHT_MODE_SNAKE + 2); break; - case _DIABLO: rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_BREATHING + 3); break; - case _RAISE: rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_BREATHING + 3); break; - case _LOWER: rgblight_set_hsv_and_mode(HSV_GREEN, RGBLIGHT_MODE_BREATHING + 3); break; - case _ADJUST: rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); break; - case _COLEMAK: rgblight_set_hsv_and_mode(HSV_MAGENTA, RGBLIGHT_MODE_STATIC_LIGHT); break; - case _DVORAK: rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, RGBLIGHT_MODE_STATIC_LIGHT); break; - case _WORKMAN: rgblight_set_hsv_and_mode(HSV_GOLDENROD, RGBLIGHT_MODE_STATIC_LIGHT); break; - case _NORMAN: rgblight_set_hsv_and_mode(HSV_CORAL, RGBLIGHT_MODE_STATIC_LIGHT); break; - case _MALTRON: rgblight_set_hsv_and_mode(HSV_YELLOW, RGBLIGHT_MODE_STATIC_LIGHT); break; - case _EUCALYN: rgblight_set_hsv_and_mode(HSV_PINK, RGBLIGHT_MODE_STATIC_LIGHT); break; - case _CARPLAX: rgblight_set_hsv_and_mode(HSV_BLUE, RGBLIGHT_MODE_STATIC_LIGHT); break; - default: rgblight_set_hsv_and_mode(HSV_CYAN, RGBLIGHT_MODE_STATIC_LIGHT); break; } } -# endif // RGBLIGHT_ENABLE +# endif // RGBLIGHT_ENABLE return state; } diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk index b9156f6a46..1ccc51ecf1 100644 --- a/users/drashna/rules.mk +++ b/users/drashna/rules.mk @@ -68,6 +68,7 @@ CUSTOM_OLED_DRIVER ?= yes ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes) ifeq ($(strip $(CUSTOM_OLED_DRIVER)), yes) SRC += oled_stuff.c + OPT_DEFS += -DCUSTOM_OLED_DRIVER_CODE endif endif @@ -78,31 +79,8 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes) QUANTUM_LIB_SRC += i2c_master.c endif -CUSTOM_SPLIT_TRANSPORT ?= yes ifeq ($(strip $(SPLIT_KEYBOARD)), yes) QUANTUM_LIB_SRC += transport_sync.c - # ifneq ($(strip $(SPLIT_TRANSPORT)), custom) - # ifeq ($(strip $(CUSTOM_SPLIT_TRANSPORT)), yes) - # SPLIT_TRANSPORT = custom - # QUANTUM_LIB_SRC += drashna_transport.c - # OPT_DEFS += -DDRASHNA_CUSTOM_TRANSPORT - # # Unused functions are pruned away, which is why we can add multiple drivers here without bloat. - # ifeq ($(PLATFORM),AVR) - # ifneq ($(NO_I2C),yes) - # QUANTUM_LIB_SRC += i2c_master.c \ - # i2c_slave.c - # endif - # endif - - # SERIAL_DRIVER ?= bitbang - # OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]')) - # ifeq ($(strip $(SERIAL_DRIVER)), bitbang) - # QUANTUM_LIB_SRC += serial.c - # else - # QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c - # endif - # endif - # endif endif # DEBUG_MATRIX_SCAN_RATE_ENABLE = api diff --git a/users/drashna/tap_dances.c b/users/drashna/tap_dances.c index 6b27afc5ae..01873489d8 100644 --- a/users/drashna/tap_dances.c +++ b/users/drashna/tap_dances.c @@ -26,7 +26,7 @@ uint8_t diablo_times[] = {0, 1, 3, 5, 10, 30}; // Cycle through the times for the macro, starting at 0, for disabled. void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) { - diable_keys_t *diablo_keys = (diable_keys_t *)user_data; + diable_keys_t *diablo_keys = (diable_keys_t *)user_data; // Sets the keycode based on the index diablo_timer[diablo_keys->index].keycode = diablo_keys->keycode; @@ -34,7 +34,7 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) { if (state->count >= (sizeof(diablo_times) / sizeof(uint8_t))) { diablo_timer[diablo_keys->index].key_interval = 0; reset_tap_dance(state); - } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one) + } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one) diablo_timer[diablo_keys->index].key_interval = diablo_times[state->count - 1]; } } @@ -64,7 +64,9 @@ void run_diablo_macro_check(void) { // reset the timer, since enough time has passed diablo_timer[index].timer = timer_read(); // send keycode ONLY if we're on the diablo layer. - if (IS_LAYER_ON(_DIABLO)) { tap_code(diablo_timer[index].keycode); } + if (IS_LAYER_ON(_DIABLO)) { + tap_code(diablo_timer[index].keycode); + } } } } diff --git a/users/drashna/tap_dances.h b/users/drashna/tap_dances.h index 182cc6756c..81e462ce29 100644 --- a/users/drashna/tap_dances.h +++ b/users/drashna/tap_dances.h @@ -35,12 +35,10 @@ extern diablo_timer_t diablo_timer[]; void run_diablo_macro_check(void); #ifdef TAP_DANCE_ENABLE -// clang-format off enum { TD_D3_1 = 0, TD_D3_2, TD_D3_3, - TD_D3_4 + TD_D3_4, }; -// clang-format on -#endif // TAP_DANCE_ENABLE +#endif // TAP_DANCE_ENABLE diff --git a/users/drashna/template.c b/users/drashna/template.c index 636955c43f..f98964ae4f 100644 --- a/users/drashna/template.c +++ b/users/drashna/template.c @@ -54,7 +54,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case VRSN: - if (record->event.pressed) { SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); } + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } return false; break; } @@ -87,7 +89,7 @@ __attribute__((weak)) void startup_keymap(void) {} void startup_user(void) { #ifdef RGBLIGHT_ENABLE matrix_init_rgb(); -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE startup_keymap(); } diff --git a/users/drashna/template.h b/users/drashna/template.h index e00a0530e3..cb1ad75d8a 100644 --- a/users/drashna/template.h +++ b/users/drashna/template.h @@ -24,8 +24,8 @@ #define BASE 0 enum custom_keycodes { - VRSN = SAFE_RANGE, // can always be here + VRSN = SAFE_RANGE, // can always be here KC_MAKE, KC_RESET, - NEWPLACEHOLDER // use "NEWPLACEHOLDER for keymap specific codes + NEWPLACEHOLDER // use "NEWPLACEHOLDER for keymap specific codes }; diff --git a/users/drashna/transport_sync.c b/users/drashna/transport_sync.c index baa1f7651a..8a3e6d1bfa 100644 --- a/users/drashna/transport_sync.c +++ b/users/drashna/transport_sync.c @@ -1,10 +1,10 @@ #ifdef SPLIT_TRANSACTION_IDS_USER -#include "transport_sync.h" -#include "transactions.h" -#include <string.h> +# include "transport_sync.h" +# include "transactions.h" +# include <string.h> typedef struct { - bool oled_on; + bool oled_on; uint16_t keymap_config; } user_runtime_config_t; @@ -23,20 +23,19 @@ void keyboard_post_init_transport_sync(void) { void user_state_update(void) { if (is_keyboard_master()) { - -#ifdef OLED_DRIVER_ENABLE +# ifdef OLED_DRIVER_ENABLE user_state.oled_on = is_oled_on(); -#endif +# endif user_state.keymap_config = keymap_config.raw; } else { -#ifdef OLED_DRIVER_ENABLE +# ifdef OLED_DRIVER_ENABLE if (user_state.oled_on) { oled_on(); } else { oled_off(); } -#endif +# endif if (keymap_config.raw != user_state.keymap_config) { keymap_config.raw = user_state.keymap_config; } diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h index be8162dfa3..8ac252926e 100644 --- a/users/drashna/wrappers.h +++ b/users/drashna/wrappers.h @@ -60,120 +60,120 @@ NOTE: These are all the same length. If you do a search/replace #define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH -#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I -#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X +#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I +#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X -#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L -#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH -#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z +#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L +#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH +#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z -#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y -#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U -#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X +#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y +#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U +#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X -#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L -#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH -#define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z +#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L +#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH +#define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z -#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B -#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G -#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V +#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B +#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G +#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V -#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN -#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT -#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH +#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN +#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT +#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH -#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K -#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G -#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B +#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K +#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G +#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B -#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN -#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U, KC_QUOT -#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH +#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN +#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U, KC_QUOT +#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH -#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B -#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F -#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM +#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B +#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F +#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM -#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L -#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R, KC_QUOT -#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X +#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L +#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R, KC_QUOT +#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X -#define _________________EUCALYN_L1________________ KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN -#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U -#define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_F +#define _________________EUCALYN_L1________________ KC_Q, KC_W, KC_COMM, KC_DOT, KC_SCLN +#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U +#define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_F -#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P -#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N, KC_QUOT -#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SLSH +#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P +#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N, KC_QUOT +#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SLSH // Qwerty-like -#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W -#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X +#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W +#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R +#define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X -#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J -#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN, KC_QUOT -#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH +#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J +#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN, KC_QUOT +#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH // Colemak like -#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W -#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J +#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W +#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R +#define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J -#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN -#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT -#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH +#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN +#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT +#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH // colemak like, zxcv fixed -#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W -#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R -#define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J +#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W +#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R +#define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J -#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN -#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT -#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH +#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN +#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H, KC_QUOT +#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH // teeheehee -#define _____________CARPLAX_TNWCLR_L1_____________ KC_T, KC_N, KC_W, KC_C, KC_L -#define _____________CARPLAX_TNWCLR_L2_____________ KC_S, KC_K, KC_J, KC_X, KC_G -#define _____________CARPLAX_TNWCLR_L3_____________ KC_E, KC_O, KC_D, KC_I, KC_A +#define _____________CARPLAX_TNWCLR_L1_____________ KC_T, KC_N, KC_W, KC_C, KC_L +#define _____________CARPLAX_TNWCLR_L2_____________ KC_S, KC_K, KC_J, KC_X, KC_G +#define _____________CARPLAX_TNWCLR_L3_____________ KC_E, KC_O, KC_D, KC_I, KC_A -#define _____________CARPLAX_TNWCLR_R1_____________ KC_R, KC_B, KC_F, KC_M, KC_H -#define _____________CARPLAX_TNWCLR_R2_____________ KC_P, KC_Q, KC_Z, KC_V, KC_SCLN, KC_QUOT -#define _____________CARPLAX_TNWCLR_R3_____________ KC_U, KC_Y, KC_COMM, KC_DOT, KC_SLSH +#define _____________CARPLAX_TNWCLR_R1_____________ KC_R, KC_B, KC_F, KC_M, KC_H +#define _____________CARPLAX_TNWCLR_R2_____________ KC_P, KC_Q, KC_Z, KC_V, KC_SCLN, KC_QUOT +#define _____________CARPLAX_TNWCLR_R3_____________ KC_U, KC_Y, KC_COMM, KC_DOT, KC_SLSH -#define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT -#define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B -#define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q +#define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT +#define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B +#define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q -#define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U -#define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O, KC_I -#define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z +#define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U +#define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O, KC_I +#define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z -#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z -#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM -#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH +#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z +#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM +#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH -#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J -#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE -#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y +#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J +#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE +#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y -#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z -#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM -#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH +#define _________________HALMAK_L1_________________ KC_W, KC_L, KC_R, KC_B, KC_Z +#define _________________HALMAK_L2_________________ KC_S, KC_H, KC_N, KC_T, KC_COMM +#define _________________HALMAK_L3_________________ KC_F, KC_M, KC_V, KC_V, KC_SLASH -#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J -#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE -#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y +#define _________________HALMAK_R1_________________ KC_SCLN, KC_Q, KC_U, KC_D, KC_J +#define _________________HALMAK_R2_________________ KC_DOT, KC_A, KC_E, KC_O, KC_I, KC_QUOTE +#define _________________HALMAK_R3_________________ KC_G, KC_P, KC_X, KC_K, KC_Y #define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 @@ -181,35 +181,35 @@ NOTE: These are all the same length. If you do a search/replace #define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 #define _________________FUNC_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 -#define ___________________BLANK___________________ _______, _______, _______, _______, _______ +#define ___________________BLANK___________________ _______, _______, _______, _______, _______ -#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC -#define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ -#define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ +#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC +#define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________ +#define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________ -#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN -#define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR -#define _________________LOWER_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN +#define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR +#define _________________LOWER_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END -#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ -#define _________________RAISE_L2__________________ ___________________BLANK___________________ -#define _________________RAISE_L3__________________ ___________________BLANK___________________ +#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________ +#define _________________RAISE_L2__________________ ___________________BLANK___________________ +#define _________________RAISE_L3__________________ ___________________BLANK___________________ -#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ -#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC -#define _________________RAISE_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________ +#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC +#define _________________RAISE_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT -#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG -#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM -#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T +#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG +#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM +#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T -#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 -#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN -#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT +#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5 +#define _________________ADJUST_R2_________________ CG_SWAP, DEFLYR1, DEFLYR2, DEFLYR3, DEFLYR4 +#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT // clang-format on |