diff options
Diffstat (limited to 'keyboards/buzzard/keymaps/default/keymap.c')
-rw-r--r-- | keyboards/buzzard/keymaps/default/keymap.c | 274 |
1 files changed, 274 insertions, 0 deletions
diff --git a/keyboards/buzzard/keymaps/default/keymap.c b/keyboards/buzzard/keymaps/default/keymap.c new file mode 100644 index 000000000..7ca3ddc7d --- /dev/null +++ b/keyboards/buzzard/keymaps/default/keymap.c | |||
@@ -0,0 +1,274 @@ | |||
1 | /* Copyright 2021 Christoph Rehmann (crehmann) | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include QMK_KEYBOARD_H | ||
17 | |||
18 | enum layers { | ||
19 | _BASE = 0, | ||
20 | _NAVR, | ||
21 | _SYMB, | ||
22 | _NUMR, | ||
23 | _FUNL, | ||
24 | _ADJL | ||
25 | }; | ||
26 | |||
27 | |||
28 | // Aliases for readability | ||
29 | #define BASE DF(_BASE) | ||
30 | #define NAVR MO(_NAVR) | ||
31 | #define SYMB MO(_SYMB) | ||
32 | #define NUMR MO(_NUMR) | ||
33 | #define FUNL MO(_FUNL) | ||
34 | #define ADJL MO(_ADJL) | ||
35 | |||
36 | // Left-hand home row mods | ||
37 | #define RALT_X RALT_T(KC_X) | ||
38 | #define GUI_A LGUI_T(KC_A) | ||
39 | #define ALT_S LALT_T(KC_S) | ||
40 | #define CTL_D LCTL_T(KC_D) | ||
41 | #define SFT_F LSFT_T(KC_F) | ||
42 | |||
43 | // Right-hand home row mods | ||
44 | #define SFT_J RSFT_T(KC_J) | ||
45 | #define CTL_K RCTL_T(KC_K) | ||
46 | #define ALT_L LALT_T(KC_L) | ||
47 | #define GUI_SCL RGUI_T(KC_SCLN) | ||
48 | #define RALT_DT RALT_T(KC_DOT) | ||
49 | |||
50 | // Left-hand outer column | ||
51 | #define CTL_ESC MT(MOD_LCTL, KC_ESC) | ||
52 | #define SFT_TAB MT(MOD_LSFT, KC_TAB) | ||
53 | |||
54 | // Thumbcluster | ||
55 | #define UC_TL1 KC_BTN1 | ||
56 | #define UC_TL2 LT(NAVR, KC_SPC) | ||
57 | #define UC_TL3 LT(NUMR, KC_TAB) | ||
58 | |||
59 | #define UC_TR3 LT(FUNL, KC_BSPC) | ||
60 | #define UC_TR2 LT(SYMB, KC_ENT) | ||
61 | #define UC_TR1 KC_BTN2 | ||
62 | |||
63 | // Shortcuts | ||
64 | #define UC_COPY LCTL(KC_C) | ||
65 | #define UC_PSTE LCTL(KC_V) | ||
66 | #define UC_CUT LCTL(KC_X) | ||
67 | #define UC_OSFT OSM(MOD_LSFT) | ||
68 | |||
69 | // clang-format off | ||
70 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
71 | |||
72 | // /* | ||
73 | // * Base Layer | ||
74 | // * | ||
75 | // * ,----------------------------------. ,----------------------------------. | ||
76 | // * | Q | W | E | R | T | | Y | U | I | O | P | | ||
77 | // * | | | | | | | | | | | | | ||
78 | // * ,------+------+------+------+------+------| |------+------+------+------+------+------. | ||
79 | // * | OSM | A | S | D | F | G | | H | J | K | L | ; : | Bksp | | ||
80 | // * | Shift| GUI | LALT | LCTL | LSFT | | | | LSFT | LCTL | ALT | GUI | | | ||
81 | // * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
82 | // * | ESC | Z | X | C | F | B | | N | M | , < | . > | / ? | ADJL | | ||
83 | // * | CTL | | RALT | | | | | | | | RALT | | | | ||
84 | // * `----------------------------------+------+-------------. ,-------------+------+----------------------------------' | ||
85 | // * | BTN1 | Space| TAB | | Bksp| Enter| BTN2 | | ||
86 | // * | | NAVR | NUMR | | FUNL| SYML | | | ||
87 | // * `--------------------' `--------------------' | ||
88 | // */ | ||
89 | [_BASE] = LAYOUT( | ||
90 | KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , | ||
91 | UC_OSFT, GUI_A , ALT_S , CTL_D , SFT_F , KC_G , KC_H , SFT_J , CTL_K , ALT_L , GUI_SCL, KC_DEL, | ||
92 | CTL_ESC, KC_Z , RALT_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, RALT_DT, KC_SLSH, ADJL , | ||
93 | KC_BTN1, UC_TL2 , UC_TL3 , UC_TR3 , UC_TR2 , UC_TR1 | ||
94 | ), | ||
95 | |||
96 | // /* | ||
97 | // * Navigation Layer (Right) | ||
98 | // * | ||
99 | // * ,----------------------------------. ,----------------------------------. | ||
100 | // * | | | | | | |Insert| Cut | PgUp | PgDn | | | ||
101 | // * | | | | | | | | | | | | | ||
102 | // * ,------+------+------+------+------+------| |------+------+------+------+------+------. | ||
103 | // * | | | | | | | | Copy | ← | ↑ | ↓ | → | | | ||
104 | // * | | | | | | | | | | | | | | | ||
105 | // * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
106 | // * | | | | | | | | Paste| Home | WH_U | WH_D | End | | | ||
107 | // * | | | | | | | | | | | | | | | ||
108 | // * `----------------------------------+------+-------------. ,-------------+------+----------------------------------' | ||
109 | // * | | | | | Bksp | Enter| | | ||
110 | // * | | | | | | | | | ||
111 | // * `--------------------' `--------------------' | ||
112 | // */ | ||
113 | [_NAVR] = LAYOUT( | ||
114 | _______, _______, _______, _______, _______, KC_INS , UC_CUT , KC_PGUP, KC_PGDN, _______, | ||
115 | _______, _______, _______, _______, _______, _______, UC_COPY, KC_LEFT, KC_UP , KC_DOWN, KC_RGHT, _______, | ||
116 | _______, _______, _______, _______, _______, _______, UC_PSTE, KC_HOME, KC_WH_U, KC_WH_D, KC_END , _______, | ||
117 | _______, _______, _______, KC_BSPC, KC_ENT , _______ | ||
118 | ), | ||
119 | // -------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
120 | |||
121 | |||
122 | // /* | ||
123 | // * Symbol Layer (Right) | ||
124 | // | ||
125 | // * ,----------------------------------. ,----------------------------------. | ||
126 | // * | ` | ~ | | | \ | | | | / | + | = | ? | | ||
127 | // * | | | | | | | | | | | | | ||
128 | // * ,------+------+------+------+------+------| |------+------+------+------+------+------. | ||
129 | // * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | | ||
130 | // * | | | | | | | | | | | | | | | ||
131 | // * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
132 | // * | | : | ; | - | [ | { | | } | ] | _ | , | . | | | ||
133 | // * | | | | | | | | | | | | | | | ||
134 | // * `----------------------------------+------+-------------. ,-------------+------+----------------------------------' | ||
135 | // * | | Space| TAB | | Bksp | Enter| | | ||
136 | // * | | | | | | | | | ||
137 | // * `--------------------' `--------------------' | ||
138 | // * | ||
139 | [_SYMB] = LAYOUT( | ||
140 | KC_GRV , KC_TILD, KC_PIPE, KC_BSLS, _______, _______, KC_SLSH, KC_PLUS, KC_EQL , KC_QUES, | ||
141 | _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, | ||
142 | _______, KC_COLN, KC_SCLN, KC_MINS, KC_LBRC, KC_LCBR, KC_RCBR, KC_RBRC, KC_UNDS, KC_COMM, KC_DOT , _______, | ||
143 | _______, KC_SPC , KC_TAB , KC_BSPC, KC_ENT , _______ | ||
144 | ), | ||
145 | |||
146 | // /* | ||
147 | // * Number Layer (Right) | ||
148 | // * | ||
149 | // * ,----------------------------------. ,----------------------------------. | ||
150 | // * | | | | | | | / | 7 | 8 | 9 | - | | ||
151 | // * | | | | | | | | | | | | | ||
152 | // * ,------+------+------+------+------+------| |------+------+------+------+------+------. | ||
153 | // * | | | | | | | | * | 4 | 5 | 6 | + | | | ||
154 | // * | | | | | | | | | | | | | | | ||
155 | // * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
156 | // * | | | | | | | | 0 | 1 | 2 | 3 | . | | | ||
157 | // * | | | | | | | | | | | | | | | ||
158 | // * `----------------------------------+------+-------------. ,-------------+------+----------------------------------' | ||
159 | // * | | | | | Bksp | Enter| | | ||
160 | // * | | | | | | | | | ||
161 | // * `--------------------' `--------------------' | ||
162 | // */ | ||
163 | [_NUMR] = LAYOUT( | ||
164 | _______, _______, _______, _______, _______, KC_SLSH, KC_7 , KC_8 , KC_9 , KC_MINS, | ||
165 | _______, _______, _______, _______, _______, _______, KC_ASTR, KC_4 , KC_5 , KC_6 , KC_PLUS, _______, | ||
166 | _______, _______, _______, _______, _______, _______, KC_0 , KC_1 , KC_2 , KC_3 , KC_DOT , _______, | ||
167 | _______, _______, _______, KC_BSPC, KC_ENT , _______ | ||
168 | ), | ||
169 | |||
170 | // /* | ||
171 | // * Function Layer (Left) | ||
172 | // * | ||
173 | // * ,----------------------------------. ,----------------------------------. | ||
174 | // * | F12 | F7 | F8 | F9 | Pause| | | | | | | | ||
175 | // * | | | | | | | | | | | | | ||
176 | // * ,------+------+------+------+------+------| |------+------+------+------+------+------. | ||
177 | // * | | F11 | F4 | F5 | F6 | PrScr| | | | | | | | | ||
178 | // * | | | | | | | | | | | | | | | ||
179 | // * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
180 | // * | | F10 | F1 | F2 | F3 | CapsL| | | | | | | | | ||
181 | // * | | | | | | | | | | | | | | | ||
182 | // * `----------------------------------+------+-------------. ,-------------+------+----------------------------------' | ||
183 | // * | | Space| TAB | | | | | | ||
184 | // * | | | | | | | | | ||
185 | // * `--------------------' `--------------------' | ||
186 | // */ | ||
187 | [_FUNL] = LAYOUT( | ||
188 | KC_F12 , KC_F7 , KC_F8 , KC_F9 , KC_PAUS, _______, _______, _______, _______, _______, | ||
189 | _______, KC_F11 , KC_F4 , KC_F5 , KC_F6 , KC_PSCR, _______, _______, _______, _______, _______, _______, | ||
190 | _______, KC_F10 , KC_F1 , KC_F2 , KC_F3 , KC_CAPS, _______, _______, _______, _______, _______, _______, | ||
191 | _______, KC_SPC , KC_TAB , _______, _______, _______ | ||
192 | ), | ||
193 | |||
194 | // /* | ||
195 | // * Adjustment Layer (Left) | ||
196 | // * | ||
197 | // * ,----------------------------------. ,----------------------------------. | ||
198 | // * | | | | | | | | | | | | | ||
199 | // * | | | | | | | | | | | | | ||
200 | // * ,------+------+------+------+------+------| |------+------+------+------+------+------. | ||
201 | // * | |M Prev| VolDn| VolDn|M Next| | | | | | | | | | ||
202 | // * | | | | | | | | | | | | | | | ||
203 | // * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
204 | // * | | | | Mute | Play | | | | | | | | | | ||
205 | // * | | | | | | | | | | | | | | | ||
206 | // * `----------------------------------+------+-------------. ,-------------+------+----------------------------------' | ||
207 | // * | | Space| TAB | | | | | | ||
208 | // * | | | | | | | | | ||
209 | // * `--------------------' `--------------------' | ||
210 | // */ | ||
211 | [_ADJL] = LAYOUT( | ||
212 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
213 | _______, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, | ||
214 | _______, _______, _______, KC_MUTE, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, | ||
215 | _______, KC_SPC , KC_TAB , _______, _______, _______ | ||
216 | ), | ||
217 | |||
218 | // -------------------------------------------------------- TEMPLATE ------------------------------------------------------------------------------------- | ||
219 | // /* | ||
220 | // * Layer | ||
221 | // * | ||
222 | // * ,----------------------------------. ,----------------------------------. | ||
223 | // * | | | | | | | | | | | | | ||
224 | // * | | | | | | | | | | | | | ||
225 | // * ,------+------+------+------+------+------| |------+------+------+------+------+------. | ||
226 | // * | | | | | | | | | | | | | | | ||
227 | // * | | | | | | | | | | | | | | | ||
228 | // * |------+------+------+------+------+------| |------+------+------+------+------+------| | ||
229 | // * | | | | | | | | | | | | | | | ||
230 | // * | | | | | | | | | | | | | | | ||
231 | // * `----------------------------------+------+-------------. ,-------------+------+----------------------------------' | ||
232 | // * | | | | | | | | | ||
233 | // * | | | | | | | | | ||
234 | // * `--------------------' `--------------------' | ||
235 | // */ | ||
236 | // [_LAYERINDEX] = LAYOUT( | ||
237 | // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
238 | // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
239 | // _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
240 | // _______, _______, _______, _______, _______, _______ | ||
241 | // ), | ||
242 | // -------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
243 | }; | ||
244 | |||
245 | // uncommint this and modify the timings if the home row mods are not working for you | ||
246 | /* | ||
247 | uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { | ||
248 | switch (keycode) { | ||
249 | case GUI_A: | ||
250 | return TAPPING_TERM + 150; | ||
251 | case ALT_S: | ||
252 | return TAPPING_TERM + 50; | ||
253 | case ALT_L: | ||
254 | return TAPPING_TERM + 50; | ||
255 | case GUI_SCL: | ||
256 | return TAPPING_TERM + 150; | ||
257 | default: | ||
258 | return TAPPING_TERM; | ||
259 | } | ||
260 | } | ||
261 | */ | ||
262 | |||
263 | #ifdef HAPTIC_ENABLE | ||
264 | |||
265 | bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record) { | ||
266 | switch (keycode) { | ||
267 | case KC_BTN1 ... KC_BTN5: | ||
268 | return true; | ||
269 | break; | ||
270 | } | ||
271 | |||
272 | return false; | ||
273 | } | ||
274 | #endif \ No newline at end of file | ||