1 #include QMK_KEYBOARD_H
4 extern keymap_config_t keymap_config;
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.
17 enum custom_keycodes {
26 // Fillers to make layering more clear
27 #define _______ KC_TRNS
29 #define LOWER MO(_LOWER)
30 #define RAISE MO(_RAISE)
32 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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 | Alt |Lower |Space | Ctrl |Enter |Space |Raise | Alt | GUI |
45 * `---------------------------------------------------------------------'
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\
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 | Alt |Lower |Space | Ctrl |Enter |Space |Raise | Alt | GUI |
66 * `---------------------------------------------------------------------'
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\
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 | Alt |Lower |Space | Ctrl |Enter |Space |Raise | Alt | GUI |
87 * `---------------------------------------------------------------------'
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\
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 * `---------------------------------------------------------------------'
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 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\
119 * ,-----------------------------------------. ,-----------------------------------------.
120 * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del |
121 * |------+------+------+------+------+------. ,------+------+------+------+------+------|
122 * | ` | 1 | ↑ | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp |
123 * |------+------+------+------+------+------. ,------+------+------+------+------+------|
124 * | Del | ← | ↓ | → | F4 | F5 | | F6 | - | = | [ | ] | | |
125 * |------+------+------+------+------+------+-------------+------+------+------+------+------+------|
126 * | | F7 | F8 | F9 | F10 | F11 | | | F12 |ISO # |ISO / | | | |
127 * `-------------+------+------+------+------+------+------+------+------+------+------+-------------'
128 * | | | | | | | | | | |
129 * `---------------------------------------------------------------------'
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 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\
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 * `---------------------------------------------------------------------'
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 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\
163 uint32_t layer_state_set_user(uint32_t state) {
164 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
167 bool process_record_user(uint16_t keycode, keyrecord_t *record) {
170 if (record->event.pressed) {
171 set_single_persistent_default_layer(_QWERTY);
176 if (record->event.pressed) {
177 set_single_persistent_default_layer(_COLEMAK);
182 if (record->event.pressed) {
183 set_single_persistent_default_layer(_DVORAK);