diff options
Diffstat (limited to 'keyboards/fortitude60/keymaps/default/keymap.c')
| -rw-r--r-- | keyboards/fortitude60/keymaps/default/keymap.c | 189 |
1 files changed, 189 insertions, 0 deletions
diff --git a/keyboards/fortitude60/keymaps/default/keymap.c b/keyboards/fortitude60/keymaps/default/keymap.c new file mode 100644 index 000000000..18d2527e4 --- /dev/null +++ b/keyboards/fortitude60/keymaps/default/keymap.c | |||
| @@ -0,0 +1,189 @@ | |||
| 1 | #include QMK_KEYBOARD_H | ||
| 2 | #include "eeconfig.h" | ||
| 3 | |||
| 4 | extern keymap_config_t keymap_config; | ||
| 5 | |||
| 6 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 7 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 8 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 9 | // entirely and just use numbers. | ||
| 10 | #define _QWERTY 0 | ||
| 11 | #define _COLEMAK 1 | ||
| 12 | #define _DVORAK 2 | ||
| 13 | #define _LOWER 3 | ||
| 14 | #define _RAISE 4 | ||
| 15 | #define _ADJUST 16 | ||
| 16 | |||
| 17 | enum custom_keycodes { | ||
| 18 | QWERTY = SAFE_RANGE, | ||
| 19 | COLEMAK, | ||
| 20 | DVORAK, | ||
| 21 | LOWER, | ||
| 22 | RAISE, | ||
| 23 | ADJUST, | ||
| 24 | }; | ||
| 25 | |||
| 26 | // Fillers to make layering more clear | ||
| 27 | #define _______ KC_TRNS | ||
| 28 | #define XXXXXXX KC_NO | ||
| 29 | #define LOWER MO(_LOWER) | ||
| 30 | #define RAISE MO(_RAISE) | ||
| 31 | |||
| 32 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 33 | |||
| 34 | /* Qwerty | ||
| 35 | * ,-----------------------------------------. ,-----------------------------------------. | ||
| 36 | * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
| 37 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 38 | * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | | ||
| 39 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 40 | * | Esc | A | S | D | F | G | | H | J | K | L | ; | " | | ||
| 41 | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| | ||
| 42 | * | Shift| Z | X | C | V | B | [ | ] | N | M | , | . | / |Enter | | ||
| 43 | * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' | ||
| 44 | * | GUI | Ctrl |Lower |Space | Ctrl |Enter |Space |Raise | Alt | GUI | | ||
| 45 | * `---------------------------------------------------------------------' | ||
| 46 | */ | ||
| 47 | [_QWERTY] = LAYOUT( \ | ||
| 48 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ | ||
| 49 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ | ||
| 50 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ | ||
| 51 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ | ||
| 52 | KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_LCTL, KC_ENT, KC_SPC, RAISE, KC_RALT, KC_RGUI\ | ||
| 53 | ), | ||
| 54 | |||
| 55 | /* Colemak | ||
| 56 | * ,-----------------------------------------. ,-----------------------------------------. | ||
| 57 | * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
| 58 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 59 | * | Tab | Q | W | F | P | G | | J | L | U | Y | ; | Bksp | | ||
| 60 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 61 | * | Esc | A | R | S | T | D | | H | N | E | I | O | " | | ||
| 62 | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| | ||
| 63 | * | Shift| Z | X | C | V | B | [ | ] | K | M | , | . | / |Enter | | ||
| 64 | * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' | ||
| 65 | * | GUI | Ctrl |Lower |Space | Ctrl |Enter |Space |Raise | Alt | GUI | | ||
| 66 | * `---------------------------------------------------------------------' | ||
| 67 | */ | ||
| 68 | [_COLEMAK] = LAYOUT( \ | ||
| 69 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ | ||
| 70 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ | ||
| 71 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ | ||
| 72 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ | ||
| 73 | KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_LCTL, KC_ENT, KC_SPC, RAISE, KC_RALT, KC_RGUI\ | ||
| 74 | ), | ||
| 75 | |||
| 76 | /* Dvorak | ||
| 77 | * ,-----------------------------------------. ,-----------------------------------------. | ||
| 78 | * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
| 79 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 80 | * | Tab | " | , | . | P | Y | | F | G | C | R | L | Bksp | | ||
| 81 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 82 | * | Esc | A | O | E | U | I | | D | H | T | N | S | / | | ||
| 83 | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| | ||
| 84 | * | Shift| ; | Q | J | K | X | [ | ] | B | M | W | V | Z |Enter | | ||
| 85 | * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' | ||
| 86 | * | GUI | Ctrl |Lower |Space | Ctrl |Enter |Space |Raise | Alt | GUI | | ||
| 87 | * `---------------------------------------------------------------------' | ||
| 88 | */ | ||
| 89 | [_DVORAK] = LAYOUT( \ | ||
| 90 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ | ||
| 91 | KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ | ||
| 92 | KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ | ||
| 93 | KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LBRC, KC_RBRC, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ | ||
| 94 | KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_LCTL, KC_ENT, KC_SPC, RAISE, KC_RALT, KC_RGUI\ | ||
| 95 | ), | ||
| 96 | |||
| 97 | /* Lower | ||
| 98 | * ,-----------------------------------------. ,-----------------------------------------. | ||
| 99 | * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | ||
| 100 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 101 | * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | | ||
| 102 | * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
| 103 | * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | | \ | | | | ||
| 104 | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| | ||
| 105 | * | | F7 | F8 | F9 | F10 | F11 | | | F12 |ISO ~ |ISO | | | | | | ||
| 106 | * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' | ||
| 107 | * | | | | | | | | | | | | ||
| 108 | * `---------------------------------------------------------------------' | ||
| 109 | */ | ||
| 110 | [_LOWER] = LAYOUT( \ | ||
| 111 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ | ||
| 112 | KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ | ||
| 113 | KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ | ||
| 114 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,\ | ||
| 115 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ | ||
| 116 | ), | ||
| 117 | |||
| 118 | /* Raise | ||
| 119 | * ,-----------------------------------------. ,-----------------------------------------. | ||
| 120 | * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | | ||
| 121 | * |------+------+------+------+------+------. ,------+------+------+------+------+------| | ||
| 122 | * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | | ||
| 123 | * |------+------+------+------+------+------. ,------+------+------+------+------+------| | ||
| 124 | * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | - | = | [ | ] | | | | ||
| 125 | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| | ||
| 126 | * | | F7 | F8 | F9 | F10 | F11 | | | F12 |ISO # |ISO / | | | | | ||
| 127 | * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' | ||
| 128 | * | | | | | | | | | | | | ||
| 129 | * `---------------------------------------------------------------------' | ||
| 130 | */ | ||
| 131 | [_RAISE] = LAYOUT( \ | ||
| 132 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ | ||
| 133 | KC_GRV, KC_1, KC_UP, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ | ||
| 134 | KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, KC_F4, KC_F5, KC_F6,KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ | ||
| 135 | _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ | ||
| 136 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ | ||
| 137 | ), | ||
| 138 | |||
| 139 | /* Adjust (Lower + Raise) | ||
| 140 | * ,-----------------------------------------. ,-----------------------------------------. | ||
| 141 | * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | ||
| 142 | * |------+------+------+------+------+------. ,------+------+------+------+------+------| | ||
| 143 | * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn| |Sat Up|Sat Dn|Val Up|Val Dn| | Bksp | | ||
| 144 | * |------+------+------+------+------+------. ,------+------+------+------+------+------| | ||
| 145 | * | | | |Aud on|Audoff|AGnorm| |AGswap| |BL TOG|BL STP| | | | ||
| 146 | * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| | ||
| 147 | * |Qwerty|Colemk|Dvorak| | | | | | | | | | | | | ||
| 148 | * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' | ||
| 149 | * | | | | | | | | | | | | ||
| 150 | * `---------------------------------------------------------------------' | ||
| 151 | */ | ||
| 152 | [_ADJUST] = LAYOUT( \ | ||
| 153 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ | ||
| 154 | _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_BSPC, \ | ||
| 155 | _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, BL_TOGG, BL_STEP, _______, _______, \ | ||
| 156 | QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | ||
| 157 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ | ||
| 158 | ) | ||
| 159 | |||
| 160 | |||
| 161 | }; | ||
| 162 | |||
| 163 | uint32_t layer_state_set_user(uint32_t state) { | ||
| 164 | return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); | ||
| 165 | } | ||
| 166 | |||
| 167 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 168 | switch (keycode) { | ||
| 169 | case QWERTY: | ||
| 170 | if (record->event.pressed) { | ||
| 171 | set_single_persistent_default_layer(_QWERTY); | ||
| 172 | } | ||
| 173 | return false; | ||
| 174 | break; | ||
| 175 | case COLEMAK: | ||
| 176 | if (record->event.pressed) { | ||
| 177 | set_single_persistent_default_layer(_COLEMAK); | ||
| 178 | } | ||
| 179 | return false; | ||
| 180 | break; | ||
| 181 | case DVORAK: | ||
| 182 | if (record->event.pressed) { | ||
| 183 | set_single_persistent_default_layer(_DVORAK); | ||
| 184 | } | ||
| 185 | return false; | ||
| 186 | break; | ||
| 187 | } | ||
| 188 | return true; | ||
| 189 | } | ||
