aboutsummaryrefslogtreecommitdiff
path: root/keyboards/buzzard/keymaps/crehmann/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/buzzard/keymaps/crehmann/keymap.c')
-rw-r--r--keyboards/buzzard/keymaps/crehmann/keymap.c256
1 files changed, 256 insertions, 0 deletions
diff --git a/keyboards/buzzard/keymaps/crehmann/keymap.c b/keyboards/buzzard/keymaps/crehmann/keymap.c
new file mode 100644
index 000000000..842494c60
--- /dev/null
+++ b/keyboards/buzzard/keymaps/crehmann/keymap.c
@@ -0,0 +1,256 @@
1// Copyright 2021 Christoph Rehmann (crehmann)
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#include QMK_KEYBOARD_H
5#include "keymap_german_ch.h"
6#include "features/haptic_utils.h"
7
8#ifdef PS2_MOUSE_ENABLE
9 #include "ps2_mouse.h"
10#endif
11
12enum layers {
13 _BASE = 0,
14 _NAVR,
15 _SYMB,
16 _NUMR,
17 _FUNL,
18 _MOAJ
19};
20
21
22// Aliases for readability
23#define BASE DF(_BASE)
24#define NAVR MO(_NAVR)
25#define SYMB MO(_SYMB)
26#define NUMR MO(_NUMR)
27#define FUNL MO(_FUNL)
28#define MOAD MO(_MOAJ)
29
30// Left-hand home row mods
31#define RALT_X RALT_T(KC_X)
32#define GUI_A LGUI_T(KC_A)
33#define ALT_S LALT_T(KC_S)
34#define CTL_D LCTL_T(KC_D)
35#define SFT_F LSFT_T(KC_F)
36
37// Right-hand home row mods
38#define SFT_J RSFT_T(KC_J)
39#define CTL_K RCTL_T(KC_K)
40#define ALT_L LALT_T(KC_L)
41#define GUI_SCL RGUI_T(KC_SCLN)
42#define RALT_DT RALT_T(KC_DOT)
43
44// Left-hand outer column
45#define CTL_ESC MT(MOD_LCTL, KC_ESC)
46
47// Thumbcluster
48#define UC_TL1 CTL_ESC
49#define UC_TL2 LT(NAVR, KC_SPC)
50#define UC_TL3 LT(NUMR, KC_TAB)
51
52#define UC_TR3 LT(FUNL, KC_BSPC)
53#define UC_TR2 LT(SYMB, KC_ENT)
54#define UC_TR1 KC_DEL
55
56// Shortcuts
57#define UC_COPY LCTL(KC_C)
58#define UC_PSTE LCTL(KC_V)
59#define UC_CUT LCTL(KC_X)
60#define UC_MUTE SGUI(KC_M)
61#define UC_OSFT OSM(MOD_LSFT)
62
63// clang-format off
64const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
65
66// /*
67// * Base Layer
68// *
69// * ,----------------------------------. ,----------------------------------.
70// * | Q | W | E | R | T | | Z | U | I | O | P |
71// * | | | | | | | | | | | |
72// * ,------+------+------+------+------+------| |------+------+------+------+------+------.
73// * | OSM | A | S | D | F | G | | H | J | K | L | ; : | Bksp |
74// * | Shift| GUI | LALT | LCTL | LSFT | | | | LSFT | LCTL | LALT | GUI | |
75// * |------+------+------+------+------+------| |------+------+------+------+------+------|
76// * | ESC | Y | X | C | F | B | | N | M | , < | . > | / ? | Mute |
77// * | CTL | | RALT | | | | | | | | RALT | | Mic |
78// * `----------------------------------+------+-------------. ,-------------+------+----------------------------------'
79// * | ESC | Space| TAB | | Bksp| Enter| Del |
80// * | CTL | NAVR | NUMR | | FUNL| SYML | |
81// * `--------------------' `--------------------'
82// */
83 [_BASE] = LAYOUT(
84 KC_Q , KC_W , KC_E , KC_R , KC_T , CH_Z , KC_U , KC_I , KC_O , KC_P ,
85 UC_OSFT, GUI_A , ALT_S , CTL_D , SFT_F , KC_G , KC_H , SFT_J , CTL_K , ALT_L , GUI_SCL, KC_BSPC,
86 CTL_ESC, CH_Y , RALT_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, RALT_DT, KC_SLSH, UC_MUTE,
87 UC_TL1 , UC_TL2 , UC_TL3 , UC_TR3 , UC_TR2 , UC_TR1
88 ),
89
90// /*
91// * Symbol Layer
92// *
93// * ,----------------------------------. ,----------------------------------.
94// * | ` | @ | { | } | $ | | ¨ | ü | / | \ | ^ |
95// * | | | | | | | | | | | |
96// * ,------+------+------+------+------+------| |------+------+------+------+------+------.
97// * | | ä | & | ( | ) | | | | ' | " | ? | ! | + | |
98// * | | | | | | | | | | | | | |
99// * |------+------+------+------+------+------| |------+------+------+------+------+------|
100// * | | % | # | [ | ] | ~ | | € | = | * | < | > | |
101// * | | | | | | | | | | | | | |
102// * `----------------------------------+------+-------------. ,-------------+------+----------------------------------'
103// * | | | TAB | | | | |
104// * | | | | | | | |
105// * `--------------------' `--------------------'
106// */
107 [_SYMB] = LAYOUT(
108 CH_GRV , CH_AT , CH_LCBR, CH_RCBR, CH_DLR , CH_DIAE, CH_UDIA, CH_SLSH, CH_BSLS, KC_CIRC,
109 _______, CH_ADIA, CH_AMPR, CH_LPRN, CH_RPRN, CH_PIPE, CH_QUOT, CH_DQUO, CH_QUES, CH_EXLM, CH_PLUS, _______,
110 _______, CH_PERC, CH_HASH, CH_LBRC, CH_RBRC, CH_TILD, CH_EURO, CH_EQL , CH_ASTR, CH_LABK, CH_RABK, _______,
111 _______, _______, KC_TAB, _______, _______ , _______
112 ),
113
114// /*
115// * Navigation Layer (Right)
116// *
117// * ,----------------------------------. ,----------------------------------.
118// * | | | | | | |Insert| Cut | PgUp | PgDn | |
119// * | | | | | | | | | | | |
120// * ,------+------+------+------+------+------| |------+------+------+------+------+------.
121// * | | | | | | | | Copy | ← | ↑ | ↓ | → | |
122// * | | | | | | | | | | | | | |
123// * |------+------+------+------+------+------| |------+------+------+------+------+------|
124// * | | | | | | | | Paste| Home | WH_U | WH_D | End | |
125// * | | | | | | | | | | | | | |
126// * `----------------------------------+------+-------------. ,-------------+------+----------------------------------'
127// * | | | | | Bksp | | Del |
128// * | | | | | | | |
129// * `--------------------' `--------------------'
130// */
131 [_NAVR] = LAYOUT(
132 _______, _______, _______, _______, _______, KC_INS , UC_CUT , KC_PGUP, KC_PGDN, _______,
133 _______, _______, _______, _______, _______, _______, UC_COPY, KC_LEFT, KC_UP , KC_DOWN, KC_RGHT, _______,
134 _______, _______, _______, _______, _______, _______, UC_PSTE, KC_HOME, KC_WH_U, KC_WH_D, KC_END , _______,
135 _______, _______, _______, KC_BSPC, _______, _______
136 ),
137// --------------------------------------------------------------------------------------------------------------------------------------------------------
138
139// /*
140// * Number Layer (Right)
141// *
142// * ,----------------------------------. ,----------------------------------.
143// * | | | | | | | / | 7 | 8 | 9 | - |
144// * | | | | | | | | | | | |
145// * ,------+------+------+------+------+------| |------+------+------+------+------+------.
146// * | | | | | | | | * | 4 | 5 | 6 | + | |
147// * | | | | | | | | | | | | | |
148// * |------+------+------+------+------+------| |------+------+------+------+------+------|
149// * | | | | | | | | 0 | 1 | 2 | 3 | . | |
150// * | | | | | | | | | | | | | |
151// * `----------------------------------+------+-------------. ,-------------+------+----------------------------------'
152// * | | | | | Bksp | Enter| |
153// * | | | | | | | |
154// * `--------------------' `--------------------'
155// */
156 [_NUMR] = LAYOUT(
157 _______, _______, _______, _______, _______, KC_SLSH, KC_7 , KC_8 , KC_9 , KC_MINS,
158 _______, _______, _______, _______, _______, _______, KC_ASTR, KC_4 , KC_5 , KC_6 , KC_PLUS, _______,
159 _______, _______, _______, _______, _______, _______, KC_0 , KC_1 , KC_2 , KC_3 , KC_DOT , _______,
160 _______, _______, _______, KC_BSPC, KC_ENT , _______
161 ),
162
163// /*
164// * Function Layer (Left)
165// *
166// * ,----------------------------------. ,----------------------------------.
167// * | F12 | F7 | F8 | F9 | Pause| | | | | | |
168// * | | | | | | | | | | | |
169// * ,------+------+------+------+------+------| |------+------+------+------+------+------.
170// * | | F11 | F4 | F5 | F6 | PrScr| | | | | | | |
171// * | | | | | | | | | | | | | |
172// * |------+------+------+------+------+------| |------+------+------+------+------+------|
173// * | | F10 | F1 | F2 | F3 | CapsL| | | | | | | |
174// * | | | | | | | | | | | | | |
175// * `----------------------------------+------+-------------. ,-------------+------+----------------------------------'
176// * | | Space| TAB | | | | |
177// * | | | | | | | |
178// * `--------------------' `--------------------'
179// */
180 [_FUNL] = LAYOUT(
181 KC_F12 , KC_F7 , KC_F8 , KC_F9 , KC_PAUS, _______, _______, _______, _______, _______,
182 _______, KC_F11 , KC_F4 , KC_F5 , KC_F6 , KC_PSCR, _______, _______, _______, _______, _______, _______,
183 _______, KC_F10 , KC_F1 , KC_F2 , KC_F3 , KC_CAPS, _______, _______, _______, _______, _______, _______,
184 _______, KC_SPC , KC_TAB , _______, _______, _______
185 ),
186
187// /*
188// * Mouse & Adjustment Layer
189// *
190// * ,----------------------------------. ,----------------------------------.
191// * | | | | | | | | | | | |
192// * | | | | | | | | | | | |
193// * ,------+------+------+------+------+------| |------+------+------+------+------+------.
194// * | | | BTN3 | BTN2 | BTN1 | | | | | | | | |
195// * | | | | | | | | | | | | | |
196// * |------+------+------+------+------+------| |------+------+------+------+------+------|
197// * | | | Cut | Copy | Paste| | | Play |M Prev| VolDn| VolUp|M Next| |
198// * | | | | | | | | | | | | | |
199// * `----------------------------------+------+-------------. ,-------------+------+----------------------------------'
200// * | | | | | | | |
201// * | | | | | | | |
202// * `--------------------' `--------------------'
203// */
204 [_MOAJ] = LAYOUT(
205 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
206 _______, _______, KC_BTN3, KC_BTN2, KC_BTN1, _______, _______, _______, _______, _______, _______, _______,
207 _______, _______, UC_CUT , UC_COPY, UC_PSTE, _______, KC_MPLY, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, _______,
208 _______, _______, _______, _______, _______, _______
209 ),
210
211// -------------------------------------------------------- TEMPLATE -------------------------------------------------------------------------------------
212// /*
213// * Layer
214// *
215// * ,----------------------------------. ,----------------------------------.
216// * | | | | | | | | | | | |
217// * | | | | | | | | | | | |
218// * ,------+------+------+------+------+------| |------+------+------+------+------+------.
219// * | | | | | | | | | | | | | |
220// * | | | | | | | | | | | | | |
221// * |------+------+------+------+------+------| |------+------+------+------+------+------|
222// * | | | | | | | | | | | | | |
223// * | | | | | | | | | | | | | |
224// * `----------------------------------+------+-------------. ,-------------+------+----------------------------------'
225// * | | | | | | | |
226// * | | | | | | | |
227// * `--------------------' `--------------------'
228// */
229// [_LAYERINDEX] = LAYOUT(
230// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
231// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
232// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
233// _______, _______, _______, _______, _______, _______
234// ),
235// --------------------------------------------------------------------------------------------------------------------------------------------------------
236};
237
238layer_state_t layer_state_set_user(layer_state_t state) {
239 process_layer_pulse(state);
240 return update_tri_layer_state(state, _NAVR, _SYMB, _MOAJ);
241}
242
243uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
244 switch (keycode) {
245 case GUI_A:
246 return TAPPING_TERM + 150;
247 case ALT_S:
248 return TAPPING_TERM + 50;
249 case ALT_L:
250 return TAPPING_TERM + 50;
251 case GUI_SCL:
252 return TAPPING_TERM + 150;
253 default:
254 return TAPPING_TERM;
255 }
256}