aboutsummaryrefslogtreecommitdiff
path: root/keyboards/beatervan/keymaps/default/keymap.c
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-04-10 12:13:40 +0100
committerAkshay <[email protected]>2022-04-10 12:13:40 +0100
commitdc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch)
tree4ccb8fa5886b66fa9d480edef74236c27f035e16 /keyboards/beatervan/keymaps/default/keymap.c
Diffstat (limited to 'keyboards/beatervan/keymaps/default/keymap.c')
-rw-r--r--keyboards/beatervan/keymaps/default/keymap.c93
1 files changed, 93 insertions, 0 deletions
diff --git a/keyboards/beatervan/keymaps/default/keymap.c b/keyboards/beatervan/keymaps/default/keymap.c
new file mode 100644
index 000000000..a99b9c9e5
--- /dev/null
+++ b/keyboards/beatervan/keymaps/default/keymap.c
@@ -0,0 +1,93 @@
1/* Copyright 2020 OJtheTiny
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
18enum layers {
19 _QW,
20 _DV,
21 _CM,
22 _L1,
23 _L2,
24 _L3,
25};
26
27enum custom_keycodes {
28 DVORAK = SAFE_RANGE,
29 QWERTY,
30 COLEMAK
31};
32
33const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
34 [_QW] = LAYOUT( /* Qwerty */
35 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
36 MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1),
37 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2),
38 KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3)
39 ),
40 [_DV] = LAYOUT( /* Dvorak */
41 KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
42 MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1),
43 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2),
44 KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3)
45 ),
46 [_CM] = LAYOUT( /* Colemak */
47 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
48 MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1),
49 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2),
50 KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, KC_SPC, KC_RALT, KC_ESC, TG(_L3)
51 ),
52 [_L1] = LAYOUT( /* LAYER 1 */
53 KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
54 _______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______,
55 _______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT,
56 _______, KC_LGUI, _______, _______, _______, _______, _______, _______
57 ),
58 [_L2] = LAYOUT( /* LAYER 2 */
59 _______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______,
60 KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_VOLU, KC_ENT,
61 _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______,
62 _______, _______, _______, _______, _______, _______, _______, _______
63 ),
64 [_L3] = LAYOUT( /* LAYER 3 */
65 _______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______,
66 KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______,
67 KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______,
68 _______, KC_LSFT, KC_B, KC_SPC, KC_C, _______, _______, _______
69 )
70};
71
72bool process_record_user(uint16_t keycode, keyrecord_t *record) {
73 switch(keycode) {
74 case DVORAK:
75 if (record->event.pressed) {
76 set_single_persistent_default_layer(_DV);
77 }
78 return false;
79 case QWERTY:
80 if (record->event.pressed) {
81 set_single_persistent_default_layer(_QW);
82 }
83 return false;
84 case COLEMAK:
85 if (record->event.pressed) {
86 set_single_persistent_default_layer(_CM);
87 }
88 return false;
89 default:
90 return true;
91 }
92 return true;
93};