diff options
Diffstat (limited to 'users/talljoe/talljoe.c')
| -rw-r--r-- | users/talljoe/talljoe.c | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/users/talljoe/talljoe.c b/users/talljoe/talljoe.c new file mode 100644 index 000000000..e49a3060d --- /dev/null +++ b/users/talljoe/talljoe.c | |||
| @@ -0,0 +1,124 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | |||
| 3 | #include "talljoe.h" | ||
| 4 | |||
| 5 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 6 | [_BASE] = LAYOUT( | ||
| 7 | KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSLS, KC_ESC, | ||
| 8 | KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T , KC_Y, KC_U, KC_I, KC_O, KC_P , KC_LBRC, KC_RBRC, KC_BSPC, | ||
| 9 | US_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G , KC_H, KC_J, KC_K, KC_L, KC_SCLN, US_QUOT, US_ENT , | ||
| 10 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO_ADJ , | ||
| 11 | KC_LCTL, KC_LGUI, KC_LALT, KC_SPC2, KC_SPC1, KC_SPC3, KC_RALT, KC_APP , KC_RCTL, KC_PTT ), | ||
| 12 | [_WORKMAN] = LAYOUT( | ||
| 13 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 14 | _______, KC_Q , KC_D , KC_R , KC_W , KC_B , KC_J , KC_F , KC_U , KC_P , KC_SCLN, _______, _______, _______, | ||
| 15 | _______, KC_A , KC_S , KC_H , KC_T , KC_G , KC_Y , KC_N , KC_E , KC_O , KC_I , _______, _______, | ||
| 16 | _______, KC_Z , KC_X , KC_M , KC_C , KC_V , KC_K , KC_L , KC_COMM, KC_DOT , KC_SLSH, _______, _______, | ||
| 17 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), | ||
| 18 | [_NORMAN] = LAYOUT( | ||
| 19 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 20 | _______, KC_Q , KC_W , KC_D , KC_F , KC_K , KC_J , KC_U , KC_R , KC_L , KC_SCLN, _______, _______, _______, | ||
| 21 | _______, KC_A , KC_S , KC_E , KC_T , KC_G , KC_Y , KC_N , KC_I , KC_O , KC_H , _______, _______, | ||
| 22 | _______, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_P , KC_M , KC_COMM, KC_DOT , KC_SLSH, _______, _______, | ||
| 23 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), | ||
| 24 | [_DVORAK] = LAYOUT( | ||
| 25 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, | ||
| 26 | _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y , KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL , _______, | ||
| 27 | _______, KC_A, KC_O, KC_E, KC_U, KC_I , KC_D, KC_H, KC_T, KC_N, KC_S, US_MINS, _______, | ||
| 28 | _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X , KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______, | ||
| 29 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), | ||
| 30 | [_COLMAK] = LAYOUT( | ||
| 31 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 32 | _______, KC_Q, KC_W, KC_F, KC_P, KC_G , KC_J, KC_L, KC_U, KC_Y, KC_SCLN, _______, _______, _______, | ||
| 33 | _______, KC_A, KC_R, KC_S, KC_T, KC_D , KC_H, KC_N, KC_E, KC_I, KC_O , _______, _______, | ||
| 34 | _______, KC_Z, KC_X, KC_C, KC_V, KC_B , KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, | ||
| 35 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), | ||
| 36 | |||
| 37 | #ifdef ENABLE_GAME_LAYER | ||
| 38 | [_GAME] = LAYOUT( | ||
| 39 | KC_ESC , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_BSLS, KC_GRV, | ||
| 40 | KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSPC, | ||
| 41 | MO_NAV , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , | ||
| 42 | KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO_ADJ , | ||
| 43 | KC_LCTL, KC_PTT , KC_PGDN, KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_APP , KC_RCTL, KC_PTT ), | ||
| 44 | #endif | ||
| 45 | [_NAV] = LAYOUT( | ||
| 46 | KC_GRV , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 47 | KC_TAB , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_VOLU, KC_INS , KC_PGUP, KC_UP , KC_PGDN, KC_BTN1, KC_BTN2, KC_BTN3, KC_DEL , | ||
| 48 | US_CAPS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_MUTE, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END , KC_RCTL, TG_ADJ , | ||
| 49 | KC_LSFT, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_END , KC_PGDN, KC_WBAK, KC_WFWD, KC_WREF, KC_RSFT, XXXXXXX, | ||
| 50 | KC_LCTL, KC_LGUI, KC_LALT, NV_SPC2, NV_SPC1, NV_SPC3, KC_RALT, KC_RGUI, KC_RCTL, KC_PTT ), | ||
| 51 | [_NUM] = LAYOUT( | ||
| 52 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 53 | KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, XXXXXXX, KC_DEL , | ||
| 54 | US_CAPS, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_PPLS, KC_PENT, XXXXXXX, | ||
| 55 | KC_LSFT, KC_EQL, KC_PLUS, KC_BSLS, KC_PIPE, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PAST, KC_PSLS, XXXXXXX, | ||
| 56 | KC_LCTL, KC_LGUI, KC_LALT, NM_SPC2, NM_SPC1, NM_SPC3, KC_PDOT, KC_PCMM, KC_RCTL, KC_PTT ), | ||
| 57 | // Adjust layer is on the split-shift key; or NAV+Enter (for non-split keyboards) | ||
| 58 | [_ADJUST] = LAYOUT( | ||
| 59 | MO_RST , FX(1) , FX(2) , FX(3) , FX(4) , FX(5) , FX(6) , FX(7) , FX(8) , FX(9) , FX(10) , BR_DEC , BR_INC , XXXXXXX, MO_RST , | ||
| 60 | XXXXXXX, H1_INC , S1_INC , H2_INC , S2_INC , EF_INC , RGB_HUI, RGB_SAI, RGB_MOD, RGB_M_P, DFAULTS, RGB_VAD, RGB_VAI, KC_DEL , | ||
| 61 | XXXXXXX, H1_DEC , S1_DEC , H2_DEC , S2_DEC , EF_DEC , RGB_HUD, RGB_SAD, RGB_RMOD,RGB_M_K, RGB_M_B, RGB_M_G, TG_ADJ , | ||
| 62 | TG_NKRO, LY_QWER, LY_WORK, LY_NRMN, LY_DVRK, LY_CLMK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MAKE, KC_CAPS, XXXXXXX, | ||
| 63 | MO_RST , AG_NORM, AG_SWAP, XXXXXXX, BL_TOGG, XXXXXXX, RGB_TOG, XXXXXXX, XXXXXXX, TG_GAME), | ||
| 64 | // To Reset hit FN + ` + Esc | ||
| 65 | [_RESET] = LAYOUT( | ||
| 66 | RESET , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , | ||
| 67 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 68 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 69 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 70 | RESET , XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX), | ||
| 71 | }; | ||
| 72 | |||
| 73 | void matrix_scan_user(void) { | ||
| 74 | #ifdef KEYBOARD_gh60 | ||
| 75 | if (IS_LAYER_ON(_GAME)) { | ||
| 76 | gh60_wasd_leds_on(); | ||
| 77 | } else { | ||
| 78 | gh60_wasd_leds_off(); | ||
| 79 | } | ||
| 80 | #endif | ||
| 81 | } | ||
| 82 | |||
| 83 | void matrix_init_user(void) { | ||
| 84 | if (!eeconfig_is_enabled()) { | ||
| 85 | eeconfig_init(); | ||
| 86 | } | ||
| 87 | } | ||
| 88 | |||
| 89 | uint32_t default_layer_state_set_kb(uint32_t state) { | ||
| 90 | // persist changes to default layers | ||
| 91 | eeconfig_update_default_layer(state); | ||
| 92 | return state; | ||
| 93 | } | ||
| 94 | |||
| 95 | __attribute__ ((weak)) | ||
| 96 | bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { | ||
| 97 | return true; | ||
| 98 | } | ||
| 99 | |||
| 100 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 101 | // If console is enabled, it will print the matrix position and status of each key pressed | ||
| 102 | #ifdef CONSOLE_ENABLE | ||
| 103 | xprintf("KL: row: %u, column: %u, pressed: %u\n", record->event.key.row, record->event.key.col, record->event.pressed); | ||
| 104 | #endif //CONSOLE_ENABLE | ||
| 105 | |||
| 106 | switch (keycode) { | ||
| 107 | case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader | ||
| 108 | if (!record->event.pressed) { | ||
| 109 | SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP | ||
| 110 | |||
| 111 | #if defined(BOOTLOADER_HALFKAY) | ||
| 112 | ":teensy" | ||
| 113 | #elif defined(BOOTLOADER_CATERINA) | ||
| 114 | ":avrdude" | ||
| 115 | #else | ||
| 116 | ":dfu" | ||
| 117 | #endif | ||
| 118 | SS_TAP(X_ENTER)); | ||
| 119 | } | ||
| 120 | return false; | ||
| 121 | break; | ||
| 122 | } | ||
| 123 | return process_record_keymap(keycode, record); | ||
| 124 | } | ||
