2020-03-23 10:48:11 +01:00
|
|
|
#include "drashna.h"
|
|
|
|
|
2020-07-13 17:44:22 +02:00
|
|
|
// make kyria/rev1:drashna:avrdude-split-let
|
|
|
|
|
|
|
|
|
2020-03-23 10:48:11 +01:00
|
|
|
uint8_t is_master;
|
|
|
|
|
|
|
|
#ifndef UNICODE_ENABLE
|
|
|
|
# define UC(x) KC_NO
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The `LAYOUT_kyria_base` macro is a template to allow the use of identical
|
|
|
|
* modifiers for the default layouts (eg QWERTY, Colemak, Dvorak, etc), so
|
|
|
|
* that there is no need to set them up for each layout, and modify all of
|
|
|
|
* them if I want to change them. This helps to keep consistency and ease
|
|
|
|
* of use. K## is a placeholder to pass through the individual keycodes
|
|
|
|
*/
|
|
|
|
|
|
|
|
// clang-format off
|
|
|
|
#define LAYOUT_kyria_base( \
|
|
|
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
|
|
|
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
|
|
|
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
|
|
|
) \
|
2020-07-13 17:44:22 +02:00
|
|
|
LAYOUT_wrapper( \
|
|
|
|
KC_ESC, K01, K02, K03, K04, K05, /*----*/ K06, K07, K08, K09, K0A, KC_BSPC, \
|
|
|
|
KC_LSFT, K11, K12, K13, K14, K15, /*----*/ K16, K17, K18, K19, K1A, KC_QUOT, \
|
|
|
|
KC_LCTL, K21, K22, K23, K24, K25, KC_CCCV, KC_NO, /*----*/ KC_LEAD, TG(_WARCRAFT), K26, K27, K28, K29, K2A, KC_MINS, \
|
|
|
|
LGUI(0), KC_LALT, LT(_NAV, KC_SPC), MO(_LOWER), KC_ENT, /*----*/ KC_DEL, MO(_RAISE), LT(_NAV, KC_SPC), KC_TAB, KC_RALT \
|
2020-03-23 10:48:11 +01:00
|
|
|
)
|
2020-07-13 17:44:22 +02:00
|
|
|
|
2020-03-23 10:48:11 +01:00
|
|
|
/* Re-pass though to allow templates to be used */
|
|
|
|
#define LAYOUT_kyria_base_wrapper(...) LAYOUT_kyria_base(__VA_ARGS__)
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
|
|
|
|
[_QWERTY] = LAYOUT_kyria_base_wrapper(
|
|
|
|
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
|
|
|
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
|
|
|
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
|
|
|
|
),
|
|
|
|
|
|
|
|
[_WORKMAN] = LAYOUT_kyria_base_wrapper(
|
|
|
|
_________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
|
|
|
|
_________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
|
|
|
|
_________________WORKMAN_L3________________, _________________WORKMAN_R3________________
|
|
|
|
),
|
|
|
|
|
|
|
|
[_MODS] = LAYOUT_wrapper(
|
|
|
|
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
|
2020-07-13 17:44:22 +02:00
|
|
|
KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, _______,
|
|
|
|
KC_LCTL, ___________________BLANK___________________, _______, _______, _______, _______, ___________________BLANK___________________, _______,
|
|
|
|
KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______, KC_RALT
|
2020-03-23 10:48:11 +01:00
|
|
|
),
|
2020-05-26 22:31:54 +02:00
|
|
|
[_DIABLO] = LAYOUT_wrapper(
|
|
|
|
KC_ESC, KC_S, KC_I, KC_F, KC_M, KC_T, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO,
|
|
|
|
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_LCTL, KC_D3_1, KC_D3_2, KC_D3_3, KC_D3_4, KC_Z, KC_J, KC_L, TG(_DIABLO), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
|
|
|
KC_DIABLO_CLEAR, KC_J, KC_NO, SFT_T(KC_SPACE), ALT_T(KC_Q), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO
|
|
|
|
),
|
2020-07-13 17:44:22 +02:00
|
|
|
|
|
|
|
[_WARCRAFT] = LAYOUT_wrapper(
|
|
|
|
KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , _______, _______, _______, _______, _______, _______,
|
|
|
|
KC_LSFT, LSFT(KC_GRV), KC_Q , KC_W , KC_E , LSFT(KC_R) , _______, _______, _______, _______, _______, _______,
|
|
|
|
KC_LCTL, KC_F , KC_A , KC_S , KC_D , LSFT(KC_F) , _______, _______, KC_M , _______ , _______, _______, _______, _______, _______, _______,
|
|
|
|
_______, KC_TAB , KC_SPC , KC_C , KC_T , KC_B , KC_I , _______, KC_DOT , _______
|
|
|
|
),
|
|
|
|
|
|
|
|
[_LOWER] = LAYOUT_kyria_base_wrapper(
|
|
|
|
_________________LOWER_L1__________________, _________________LOWER_R1__________________,
|
|
|
|
_________________LOWER_L2__________________, _________________LOWER_R2__________________,
|
|
|
|
_________________LOWER_L3__________________, _________________LOWER_R3__________________
|
|
|
|
),
|
|
|
|
[_RAISE] = LAYOUT_kyria_base_wrapper(
|
|
|
|
_________________RAISE_L1__________________, _________________RAISE_R1__________________,
|
|
|
|
_________________RAISE_L2__________________, _________________RAISE_R2__________________,
|
|
|
|
_________________RAISE_L3__________________, _________________RAISE_R3__________________
|
2020-03-23 10:48:11 +01:00
|
|
|
),
|
2020-07-13 17:44:22 +02:00
|
|
|
[_ADJUST] = LAYOUT_kyria_base_wrapper(
|
|
|
|
_________________ADJUST_L1_________________, _________________ADJUST_R1_________________,
|
|
|
|
_________________ADJUST_L2_________________, _________________ADJUST_R2_________________,
|
|
|
|
_________________ADJUST_L3_________________, _________________ADJUST_R3_________________
|
2020-03-23 10:48:11 +01:00
|
|
|
),
|
2020-07-13 17:44:22 +02:00
|
|
|
[_NAV] = LAYOUT_kyria_base_wrapper(
|
|
|
|
___________________NAV_L1__________________, ___________________NAV_R1__________________,
|
|
|
|
___________________NAV_L2__________________, ___________________NAV_R2__________________,
|
|
|
|
___________________NAV_L3__________________, ___________________NAV_R3__________________
|
2020-03-23 10:48:11 +01:00
|
|
|
),
|
|
|
|
// [_LAYERINDEX] = LAYOUT_wrapper(
|
|
|
|
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
|
|
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
|
|
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
|
|
|
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
|
|
|
// ),
|
|
|
|
};
|
|
|
|
// clang-format on
|
|
|
|
|
|
|
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|
|
|
if (record->event.pressed) {
|
|
|
|
#ifndef SPLIT_KEYBOARD
|
|
|
|
if (keycode == RESET && !is_master) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
2020-05-26 22:31:54 +02:00
|
|
|
|
2020-03-23 10:48:11 +01:00
|
|
|
void matrix_init_keymap(void) { is_master = (uint8_t)is_keyboard_master(); }
|
|
|
|
|
|
|
|
#ifdef OLED_DRIVER_ENABLE
|
|
|
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; }
|
|
|
|
|
|
|
|
// clang-format off
|
|
|
|
|
|
|
|
# ifndef SPLIT_TRANSPORT_MIRROR
|
2020-05-26 22:31:54 +02:00
|
|
|
void oled_driver_render_logo(void) {
|
2020-03-23 10:48:11 +01:00
|
|
|
static const char PROGMEM kyria_logo[] = {
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128,192,224,240,112,120, 56, 60, 28, 30, 14, 14, 14, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 14, 14, 14, 30, 28, 60, 56,120,112,240,224,192,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0,192,224,240,124, 62, 31, 15, 7, 3, 1,128,192,224,240,120, 56, 60, 28, 30, 14, 14, 7, 7,135,231,127, 31,255,255, 31,127,231,135, 7, 7, 14, 14, 30, 28, 60, 56,120,240,224,192,128, 1, 3, 7, 15, 31, 62,124,240,224,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0,240,252,255, 31, 7, 1, 0, 0,192,240,252,254,255,247,243,177,176, 48, 48, 48, 48, 48, 48, 48,120,254,135, 1, 0, 0,255,255, 0, 0, 1,135,254,120, 48, 48, 48, 48, 48, 48, 48,176,177,243,247,255,254,252,240,192, 0, 0, 1, 7, 31,255,252,240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0,255,255,255, 0, 0, 0, 0, 0,254,255,255, 1, 1, 7, 30,120,225,129,131,131,134,134,140,140,152,152,177,183,254,248,224,255,255,224,248,254,183,177,152,152,140,140,134,134,131,131,129,225,120, 30, 7, 1, 1,255,255,254, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0,255,255, 0, 0,192,192, 48, 48, 0, 0,240,240, 0, 0, 0, 0, 0, 0,240,240, 0, 0,240,240,192,192, 48, 48, 48, 48,192,192, 0, 0, 48, 48,243,243, 0, 0, 0, 0, 0, 0, 48, 48, 48, 48, 48, 48,192,192, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0,255,255,255, 0, 0, 0, 0, 0,127,255,255,128,128,224,120, 30,135,129,193,193, 97, 97, 49, 49, 25, 25,141,237,127, 31, 7,255,255, 7, 31,127,237,141, 25, 25, 49, 49, 97, 97,193,193,129,135, 30,120,224,128,128,255,255,127, 0, 0, 0, 0, 0,255,255,255, 0, 0, 0, 0, 63, 63, 3, 3, 12, 12, 48, 48, 0, 0, 0, 0, 51, 51, 51, 51, 51, 51, 15, 15, 0, 0, 63, 63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 48, 63, 63, 48, 48, 0, 0, 12, 12, 51, 51, 51, 51, 51, 51, 63, 63, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 15, 63,255,248,224,128, 0, 0, 3, 15, 63,127,255,239,207,141, 13, 12, 12, 12, 12, 12, 12, 12, 30,127,225,128, 0, 0,255,255, 0, 0,128,225,127, 30, 12, 12, 12, 12, 12, 12, 12, 13,141,207,239,255,127, 63, 15, 3, 0, 0,128,224,248,255, 63, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 62,124,248,240,224,192,128, 1, 3, 7, 15, 30, 28, 60, 56,120,112,112,224,224,225,231,254,248,255,255,248,254,231,225,224,224,112,112,120, 56, 60, 28, 30, 15, 7, 3, 1,128,192,224,240,248,124, 62, 15, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 7, 15, 14, 30, 28, 60, 56,120,112,112,112,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,224,112,112,112,120, 56, 60, 28, 30, 14, 15, 7, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
|
|
|
};
|
|
|
|
oled_write_raw_P(kyria_logo, sizeof(kyria_logo));
|
|
|
|
}
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|