2021-05-10 19:33:00 +00:00
|
|
|
#include QMK_KEYBOARD_H
|
|
|
|
#include "version.h"
|
2021-07-31 10:41:28 +00:00
|
|
|
#include "split_util.h"
|
2021-05-10 19:33:00 +00:00
|
|
|
|
2021-07-31 10:41:28 +00:00
|
|
|
// START-MUGUR-REGION
|
2021-05-10 19:33:00 +00:00
|
|
|
|
|
|
|
|
2021-07-31 10:41:28 +00:00
|
|
|
/* Macros */
|
|
|
|
enum custom_keycodes {EPRM = SAFE_RANGE, MACRO_16, MACRO_15, MACRO_14, MACRO_13, MACRO_12, MACRO_11, MACRO_10, MACRO_9, MACRO_8, MACRO_7, MACRO_6, MACRO_5, MACRO_4, MACRO_3, MACRO_2, MACRO_1};
|
2021-05-10 19:33:00 +00:00
|
|
|
|
|
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
2021-07-31 10:41:28 +00:00
|
|
|
if (record->event.pressed) {
|
|
|
|
switch (keycode) {
|
|
|
|
case MACRO_1: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_0)); return false;
|
|
|
|
case MACRO_2: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_2)); return false;
|
|
|
|
case MACRO_3: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_3)); return false;
|
|
|
|
case MACRO_4: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_4) SS_TAP(X_T)); return false;
|
|
|
|
case MACRO_5: SEND_STRING(SS_LCTL(SS_TAP(X_LALT)) SS_TAP(X_O)); return false;
|
|
|
|
case MACRO_6: SEND_STRING(SS_LALT(SS_TAP(X_X)) "gtd" SS_TAP(X_ENTER)); return false;
|
|
|
|
case MACRO_7: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_B)); return false;
|
|
|
|
case MACRO_8: SEND_STRING("λ"); return false;
|
|
|
|
case MACRO_9: SEND_STRING(SS_LALT(SS_TAP(X_X)) "magit" SS_TAP(X_ENTER)); return false;
|
|
|
|
case MACRO_10: SEND_STRING(SS_RCMD(SS_TAP(X_I)) SS_TAP(X_E)); return false;
|
|
|
|
case MACRO_11: SEND_STRING(SS_LCTL(SS_TAP(X_X)) SS_TAP(X_8)); return false;
|
|
|
|
case MACRO_12: SEND_STRING(SS_RCMD(SS_TAP(X_I)) SS_TAP(X_O)); return false;
|
|
|
|
case MACRO_13: SEND_STRING(SS_RCMD(SS_TAP(X_I)) SS_TAP(X_L)); return false;
|
|
|
|
case MACRO_14: SEND_STRING(SS_RCMD(SS_TAP(X_M)) SS_TAP(X_N)); return false;
|
|
|
|
case MACRO_15: SEND_STRING(SS_RCMD(SS_TAP(X_M)) SS_TAP(X_M)); return false;
|
|
|
|
case MACRO_16: SEND_STRING(SS_RCMD(SS_TAP(X_M)) SS_TAP(X_S)); return false;}
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
};
|
2021-05-10 19:33:00 +00:00
|
|
|
|
2021-07-31 10:41:28 +00:00
|
|
|
/* Layer Codes and Matrix */
|
|
|
|
enum layer_codes {BASE = 0, NUMERIC = 1, MOVE = 2, EMACS = 3, HYPM = 4, QMIK = 15};
|
2021-05-10 19:33:00 +00:00
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
|
2021-07-31 10:41:28 +00:00
|
|
|
[BASE] = LAYOUT_split_3x6_3(KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCOLON, LT(MOVE, KC_QUOTE), MT(MOD_LSFT, KC_UP), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, LT(HYPM, KC_DOWN), MO(EMACS), KC_LAPO, MT(MOD_LGUI, KC_SPACE), MT(MOD_RGUI, KC_ENTER), KC_RAPC, TT(NUMERIC)),
|
2021-05-10 19:33:00 +00:00
|
|
|
|
2021-07-31 10:41:28 +00:00
|
|
|
[NUMERIC] = LAYOUT_split_3x6_3(KC_TILDE, KC_EXCLAIM, KC_AT, KC_HASH, KC_DOLLAR, KC_PERCENT, KC_CIRCUMFLEX, KC_AMPERSAND, KC_ASTERISK, KC_MINUS, KC_EQUAL, KC_BSPACE, KC_0, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LT(MOVE, KC_ENTER), MT(MOD_LSFT, KC_LEFT), KC_GRAVE, KC_TRNS, KC_TRNS, KC_LEFT_CURLY_BRACE, KC_LBRACKET, KC_RBRACKET, KC_RIGHT_CURLY_BRACE, KC_COMMA, KC_DOT, KC_PIPE, MT(MOD_RSFT, KC_RIGHT), TG(QMIK), KC_LAPO, KC_TRNS, KC_TRNS, KC_RAPC, KC_TRNS),
|
2021-05-10 19:33:00 +00:00
|
|
|
|
2021-07-31 10:41:28 +00:00
|
|
|
[MOVE] = LAYOUT_split_3x6_3(KC_TRNS, LALT(KC_V), KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_TRNS, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, LALT(KC_LEFT_ANGLE_BRACKET), LCTL(KC_V), LALT(KC_RIGHT_ANGLE_BRACKET), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCTL, KC_LSFT, KC_LGUI, KC_TRNS, KC_TRNS, KC_TRNS),
|
2021-05-10 19:33:00 +00:00
|
|
|
|
2021-07-31 10:41:28 +00:00
|
|
|
[EMACS] = LAYOUT_split_3x6_3(KC_ESCAPE, KC_TRNS, KC_TRNS, MACRO_1, MACRO_2, MACRO_3, MACRO_4, KC_TRNS, KC_TRNS, MACRO_5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LALT(KC_PERCENT), KC_TRNS, KC_TRNS, MACRO_6, MACRO_7, KC_TRNS, KC_TRNS, MACRO_8, KC_TRNS, KC_TRNS, RESET, KC_TRNS, LALT(KC_X), LCTL(KC_C), KC_TRNS, KC_LEFT_PAREN, KC_RIGHT_PAREN, MACRO_9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACRO_10, MACRO_11, KC_TRNS, MO(HYPM)),
|
2021-05-10 19:33:00 +00:00
|
|
|
|
2021-07-31 10:41:28 +00:00
|
|
|
[HYPM] = LAYOUT_split_3x6_3(KC_X, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_I, MACRO_12, MACRO_13, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_D, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MACRO_14, MACRO_15, MACRO_16, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
2021-05-10 19:33:00 +00:00
|
|
|
|
2021-07-31 10:41:28 +00:00
|
|
|
[QMIK] = LAYOUT_split_3x6_3(KC_NO, RGB_TOG, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, RGB_SAD, RGB_VAD, RGB_HUD, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAI, RGB_VAI, RGB_HUI, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)};
|
2021-05-10 19:33:00 +00:00
|
|
|
|
|
|
|
// END-MUGUR-REGION
|
|
|
|
|
|
|
|
#ifdef OLED_DRIVER_ENABLE
|
|
|
|
// 'fm_logo-128x32', 32x128px
|
|
|
|
static void render_logo(void) {
|
|
|
|
static const char PROGMEM fm_logo[] = {
|
2021-07-31 10:41:28 +00:00
|
|
|
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, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x20, 0x70, 0x78, 0x78, 0x78, 0x78, 0x38, 0x30, 0x60, 0xd0, 0xc0, 0x80,
|
|
|
|
0x80, 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, 0x01,
|
|
|
|
0x83, 0xcf, 0xfe, 0xfc, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x0c, 0x0e, 0x1e, 0x1e, 0x3e, 0x7e, 0xfe, 0xff,
|
|
|
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x78, 0x70, 0x70, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xe0, 0xfb,
|
|
|
|
0xff, 0xff, 0x83, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x07, 0x07, 0x0f, 0x1f, 0x7f, 0xff, 0xff,
|
|
|
|
0x7f, 0x3f, 0x3f, 0x1f, 0x1f, 0x1e, 0x1e, 0x1c, 0x1c, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x30, 0x30, 0x60, 0x60, 0x60, 0xe0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8, 0xf8, 0xfe, 0xff, 0xf8,
|
|
|
|
0xe0, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x0f, 0xff, 0xff, 0xff, 0x1f, 0x0f, 0x07,
|
|
|
|
0x07, 0x07, 0x03, 0x03, 0x83, 0x83, 0x83, 0x83, 0x83, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0e, 0x1c, 0xf8,
|
|
|
|
0xfc, 0xfe, 0x6f, 0xe7, 0xf3, 0xf9, 0xf9, 0xf9, 0xf9, 0xf3, 0xe3, 0x07, 0x1e, 0xfc, 0xf0, 0x00,
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
|
|
|
0x07, 0x0f, 0x1c, 0x38, 0x33, 0x33, 0x77, 0x77, 0x33, 0x33, 0x39, 0x1c, 0x0f, 0x07, 0x01, 0x00
|
2021-05-10 19:33:00 +00:00
|
|
|
};
|
|
|
|
oled_write_raw_P(fm_logo, sizeof(fm_logo));
|
|
|
|
}
|
|
|
|
|
|
|
|
// rotate the OLEDs
|
|
|
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
|
|
|
if (isLeftHand) {
|
|
|
|
return OLED_ROTATION_270;
|
|
|
|
} else {
|
|
|
|
return OLED_ROTATION_90;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void oled_task_user(void) {
|
|
|
|
render_logo();
|
|
|
|
oled_scroll_set_speed(5);
|
|
|
|
oled_scroll_left();
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void keyboard_post_init_user(void) {
|
|
|
|
debug_enable=true;
|
|
|
|
debug_keyboard=true;
|
2021-07-31 10:41:28 +00:00
|
|
|
//debug_matrix=true;
|
2021-05-10 19:33:00 +00:00
|
|
|
//debug_mouse=true;
|
|
|
|
}
|