diff options
Diffstat (limited to 'keyboards/splitkb/kyria/keymaps/drashna/keymap.c')
| -rw-r--r-- | keyboards/splitkb/kyria/keymaps/drashna/keymap.c | 101 |
1 files changed, 36 insertions, 65 deletions
diff --git a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c index 14287d0ec..d55110e97 100644 --- a/keyboards/splitkb/kyria/keymaps/drashna/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/drashna/keymap.c | |||
| @@ -38,58 +38,32 @@ | |||
| 38 | KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ | 38 | KC_MUTE, OS_LALT, KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI, UC(0x03A8), UC(0x2E2E) \ |
| 39 | ) | 39 | ) |
| 40 | /* Re-pass though to allow templates to be used */ | 40 | /* Re-pass though to allow templates to be used */ |
| 41 | #define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) | 41 | #define LAYOUT_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__) |
| 42 | 42 | ||
| 43 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | 43 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |
| 44 | 44 | [_DEFAULT_LAYER_1] = LAYOUT_base_wrapper( | |
| 45 | [_QWERTY] = LAYOUT_kyria_base_wrapper( | ||
| 46 | _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, | 45 | _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, |
| 47 | _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, | 46 | _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, |
| 48 | _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ | 47 | _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ |
| 49 | ), | 48 | ), |
| 50 | 49 | ||
| 51 | [_COLEMAK] = LAYOUT_kyria_base_wrapper( | 50 | [_DEFAULT_LAYER_2] = LAYOUT_base_wrapper( |
| 51 | ______________COLEMAK_MOD_DH_L1____________, ______________COLEMAK_MOD_DH_R1____________, | ||
| 52 | ______________COLEMAK_MOD_DH_L2____________, ______________COLEMAK_MOD_DH_R2____________, | ||
| 53 | ______________COLEMAK_MOD_DH_L3____________, ______________COLEMAK_MOD_DH_R3____________ | ||
| 54 | ), | ||
| 55 | [_DEFAULT_LAYER_3] = LAYOUT_base_wrapper( | ||
| 52 | _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, | 56 | _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, |
| 53 | _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, | 57 | _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, |
| 54 | _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ | 58 | _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ |
| 55 | ), | 59 | ), |
| 56 | 60 | ||
| 57 | [_DVORAK] = LAYOUT_kyria_base_wrapper( | 61 | [_DEFAULT_LAYER_4] = LAYOUT_base_wrapper( |
| 58 | _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, | 62 | _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, |
| 59 | _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, | 63 | _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, |
| 60 | _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ | 64 | _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ |
| 61 | ), | 65 | ), |
| 62 | 66 | ||
| 63 | [_WORKMAN] = LAYOUT_kyria_base_wrapper( | ||
| 64 | _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, | ||
| 65 | _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, | ||
| 66 | _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ | ||
| 67 | ), | ||
| 68 | |||
| 69 | [_NORMAN] = LAYOUT_kyria_base_wrapper( | ||
| 70 | _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, | ||
| 71 | _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, | ||
| 72 | _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ | ||
| 73 | ), | ||
| 74 | |||
| 75 | [_MALTRON] = LAYOUT_kyria_base_wrapper( | ||
| 76 | _________________MALTRON_L1________________, _________________MALTRON_R1________________, | ||
| 77 | _________________MALTRON_L2________________, _________________MALTRON_R2________________, | ||
| 78 | _________________MALTRON_L3________________, _________________MALTRON_R3________________ | ||
| 79 | ), | ||
| 80 | |||
| 81 | [_EUCALYN] = LAYOUT_kyria_base_wrapper( | ||
| 82 | _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, | ||
| 83 | _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, | ||
| 84 | _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ | ||
| 85 | ), | ||
| 86 | |||
| 87 | [_CARPLAX] = LAYOUT_kyria_base_wrapper( | ||
| 88 | _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, | ||
| 89 | _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, | ||
| 90 | _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ | ||
| 91 | ), | ||
| 92 | |||
| 93 | [_GAMEPAD] = LAYOUT_wrapper( | 67 | [_GAMEPAD] = LAYOUT_wrapper( |
| 94 | KC_ESC, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, | 68 | KC_ESC, KC_K, KC_Q, KC_W, KC_E, KC_R, _______, _______, _______, _______, _______, _______, |
| 95 | KC_TAB, KC_G, KC_A, KC_S, KC_D, KC_F, _______, _______, _______, _______, _______, _______, | 69 | 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] = { | |||
| 128 | // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | 102 | // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 129 | // ), | 103 | // ), |
| 130 | }; | 104 | }; |
| 105 | |||
| 106 | #ifdef ENCODER_MAP_ENABLE | ||
| 107 | const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { | ||
| 108 | [_DEFAULT_LAYER_1] = { { KC_DOWN, KC_UP }, { KC_VOLD, KC_VOLU } }, | ||
| 109 | [_DEFAULT_LAYER_2] = { { _______, _______ }, { _______, _______ } }, | ||
| 110 | [_DEFAULT_LAYER_3] = { { _______, _______ }, { _______, _______ } }, | ||
| 111 | [_DEFAULT_LAYER_4] = { { _______, _______ }, { _______, _______ } }, | ||
| 112 | [_GAMEPAD] = { { _______, _______ }, { _______, _______ } }, | ||
| 113 | [_DIABLO] = { { _______, _______ }, { _______, _______ } }, | ||
| 114 | [_MOUSE] = { { _______, _______ }, { KC_WH_D, KC_WH_U } }, | ||
| 115 | [_MEDIA] = { { _______, _______ }, { _______, _______ } }, | ||
| 116 | [_RAISE] = { { _______, _______ }, { KC_PGDN, KC_PGUP } }, | ||
| 117 | [_LOWER] = { { RGB_MOD, RGB_RMOD}, { RGB_HUD, RGB_HUI } }, | ||
| 118 | [_ADJUST] = { { CK_DOWN, CK_UP }, { _______, _______ } }, | ||
| 119 | }; | ||
| 120 | #endif | ||
| 131 | // clang-format on | 121 | // clang-format on |
| 132 | 122 | ||
| 133 | #ifdef OLED_DRIVER_ENABLE | 123 | #ifdef OLED_DRIVER_ENABLE |
| @@ -156,39 +146,20 @@ bool encoder_update_user(uint8_t index, bool clockwise) { | |||
| 156 | #endif | 146 | #endif |
| 157 | 147 | ||
| 158 | #ifdef RGBLIGHT_LAYERS | 148 | #ifdef RGBLIGHT_LAYERS |
| 159 | const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS( | 149 | const rgblight_segment_t PROGMEM shift_layers[] = RGBLIGHT_LAYER_SEGMENTS({8, 1, 120, 255, 255}, {18, 1, 120, 255, 255}); |
| 160 | { 8, 1, 120, 255, 255}, | 150 | const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS({6, 1, 0, 255, 255}, {16, 1, 0, 255, 255}); |
| 161 | { 18, 1, 120, 255, 255} | 151 | const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS({2, 1, 240, 255, 255}, {17, 1, 250, 255, 255}); |
| 162 | ); | 152 | const rgblight_segment_t PROGMEM gui_layers[] = RGBLIGHT_LAYER_SEGMENTS({7, 1, 51, 255, 255}, {12, 1, 51, 255, 255}); |
| 163 | const rgblight_segment_t PROGMEM control_layers[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 164 | { 6, 1, 0, 255, 255}, | ||
| 165 | { 16, 1, 0, 255, 255} | ||
| 166 | ); | ||
| 167 | const rgblight_segment_t PROGMEM alt_layers[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 168 | { 2, 1, 240, 255, 255}, | ||
| 169 | { 17, 1, 250, 255, 255} | ||
| 170 | ); | ||
| 171 | const rgblight_segment_t PROGMEM gui_layers[] = RGBLIGHT_LAYER_SEGMENTS( | ||
| 172 | { 7, 1, 51, 255, 255}, | ||
| 173 | { 12, 1, 51, 255, 255} | ||
| 174 | ); | ||
| 175 | 153 | ||
| 176 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | 154 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(shift_layers, control_layers, alt_layers, gui_layers); |
| 177 | shift_layers, | ||
| 178 | control_layers, | ||
| 179 | alt_layers, | ||
| 180 | gui_layers | ||
| 181 | ); | ||
| 182 | 155 | ||
| 183 | void keyboard_post_init_keymap(void) { | 156 | void keyboard_post_init_keymap(void) { rgblight_layers = my_rgb_layers; } |
| 184 | rgblight_layers = my_rgb_layers; | ||
| 185 | } | ||
| 186 | 157 | ||
| 187 | void matrix_scan_keymap(void) { | 158 | void matrix_scan_keymap(void) { |
| 188 | uint8_t mods = mod_config(get_mods()|get_oneshot_mods()); | 159 | uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); |
| 189 | rgblight_set_layer_state(0, mods & MOD_MASK_SHIFT); | 160 | rgblight_set_layer_state(0, mods & MOD_MASK_SHIFT); |
| 190 | rgblight_set_layer_state(1, mods & MOD_MASK_CTRL); | 161 | rgblight_set_layer_state(1, mods & MOD_MASK_CTRL); |
| 191 | rgblight_set_layer_state(2, mods & MOD_MASK_ALT); | 162 | rgblight_set_layer_state(2, mods & MOD_MASK_ALT); |
| 192 | rgblight_set_layer_state(3, mods & MOD_MASK_GUI); | 163 | rgblight_set_layer_state(3, mods & MOD_MASK_GUI); |
| 193 | } | 164 | } |
| 194 | #endif | 165 | #endif |
