aboutsummaryrefslogtreecommitdiff
path: root/keyboards/beatervan/keymaps/oj/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/beatervan/keymaps/oj/keymap.c')
-rw-r--r--keyboards/beatervan/keymaps/oj/keymap.c93
1 files changed, 93 insertions, 0 deletions
diff --git a/keyboards/beatervan/keymaps/oj/keymap.c b/keyboards/beatervan/keymaps/oj/keymap.c
new file mode 100644
index 000000000..6b32c4ddc
--- /dev/null
+++ b/keyboards/beatervan/keymaps/oj/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};
26enum custom_keycodes {
27 DVORAK = SAFE_RANGE,
28 QWERTY,
29 COLEMAK
30};
31
32
33const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
34 [_QW] = LAYOUT( /* Qwerty */
35 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL,
36 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENTER,
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_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3)
39 ),
40 [_DV] = LAYOUT( /* Dvorak */
41 KC_ESC, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_QUOT,
42 KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENTER,
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_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3)
45 ),
46 [_CM] = LAYOUT( /* Colemak */
47 KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_QUOT,
48 KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENTER,
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_TAB, MO(_L1), KC_LGUI, KC_SPC, KC_BSPC, KC_LALT, KC_RALT, TG(_L3)
51 ),
52 [_L1] = LAYOUT( /* NUM */
53 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
54 _______, _______, _______, _______, _______, _______, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_SCLN, KC_BSLS,
55 _______, _______, _______, KC_PSCR, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL,
56 _______, _______, _______, _______, _______, _______, _______, _______
57 ),
58 [_L2] = LAYOUT( /* F Keys */
59 _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
60 _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, KC_ENTER,
61 _______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, _______, _______, _______, _______, _______,
62 _______, _______, _______, _______, _______, _______, _______, _______
63 ),
64 [_L3] = LAYOUT( /* Gaming */
65 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______,
66 KC_TAB, KC_Q, KC_W, KC_E, KC_R, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______,
67 KC_LCTL, KC_A, KC_S, KC_D, KC_F, _______, MO(_L2), KC_F9, KC_F10, KC_F11, KC_F12, _______,
68 KC_LSFT, KC_Z, KC_B, KC_SPC, KC_BSPC, _______, _______, TG(_L3)
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};