aboutsummaryrefslogtreecommitdiff
path: root/keyboards/contra/keymaps/erovia/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/contra/keymaps/erovia/keymap.c')
-rw-r--r--keyboards/contra/keymaps/erovia/keymap.c163
1 files changed, 163 insertions, 0 deletions
diff --git a/keyboards/contra/keymaps/erovia/keymap.c b/keyboards/contra/keymaps/erovia/keymap.c
new file mode 100644
index 000000000..9b72e5733
--- /dev/null
+++ b/keyboards/contra/keymaps/erovia/keymap.c
@@ -0,0 +1,163 @@
1#include QMK_KEYBOARD_H
2
3extern keymap_config_t keymap_config;
4
5enum planck_layers {
6 _QWERTY,
7 _COLEMAK,
8 _LOWER,
9 _RAISE,
10 _ADJUST
11};
12
13enum planck_keycodes {
14 QWERTY = SAFE_RANGE,
15 COLEMAK,
16 LOWER,
17 RAISE
18};
19
20enum {
21 TD_SPACE_CADET_SHIFT = 0,
22 TD_SPACE_CADET_ENTER = 1
23};
24
25qk_tap_dance_action_t tap_dance_actions[] = {
26 [TD_SPACE_CADET_SHIFT] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_LPRN),
27 [TD_SPACE_CADET_ENTER] = ACTION_TAP_DANCE_DOUBLE(KC_ENT, KC_RPRN)
28};
29
30#define TD_SHFT TD(TD_SPACE_CADET_SHIFT)
31#define TD_ENTR TD(TD_SPACE_CADET_ENTER)
32
33const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
34
35/* Qwerty
36 * ,-----------------------------------------------------------------------------------.
37 * | ` | Q | W | E | R | T | Y | U | I | O | P | Bksp |
38 * |------+------+------+------+------+-------------+------+------+------+------+------|
39 * | Esc | A | S | D | F | G | H | J | K | L | ; | ' |
40 * |------+------+------+------+------+------|------+------+------+------+------+------|
41 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
42 * |------+------+------+------+------+------+------+------+------+------+------+------|
43 * | Ctrl | GUI | Alt | GUI |Lower | Tab |Space |Raise | Left | Down | Up |Right |
44 * `-----------------------------------------------------------------------------------'
45 */
46[_QWERTY] = LAYOUT_ortho_4x12(
47 KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
48 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
49 TD_SHFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TD_ENTR,
50 KC_LCTL, KC_LGUI, KC_LALT, KC_LGUI, LOWER, KC_TAB, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
51),
52
53/* Colemak
54 * ,-----------------------------------------------------------------------------------.
55 * | ` | Q | W | F | P | B | J | L | U | Y | ; | Bksp |
56 * |------+------+------+------+------+-------------+------+------+------+------+------|
57 * | Ctrl | A | R | S | T | G | M | N | E | I | O | ' |
58 * |------+------+------+------+------+------|------+------+------+------+------+------|
59 * | Shift| Z | X | C | D | V | K | H | , | . | / |Enter |
60 * |------+------+------+------+------+------+------+------+------+------+------+------|
61 * | Ctrl | GUI | Alt | GUI |Lower | Tab |Space |Raise | Left | Down | Up |Right |
62 * `-----------------------------------------------------------------------------------'
63 */
64[_COLEMAK] = LAYOUT_ortho_4x12(
65 KC_GRV, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
66 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
67 TD(TD_SPACE_CADET_SHIFT), KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, TD(TD_SPACE_CADET_ENTER),
68 KC_LCTL, KC_LGUI, KC_LALT, KC_LGUI, LOWER, KC_TAB, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
69),
70
71/* Lower
72 * ,-----------------------------------------------------------------------------------.
73 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
74 * |------+------+------+------+------+-------------+------+------+------+------+------|
75 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
76 * |------+------+------+------+------+------|------+------+------+------+------+------|
77 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
78 * |------+------+------+------+------+------+------+------+------+------+------+------|
79 * | | | | | | | | Next | Vol- | Vol+ | Play |
80 * `-----------------------------------------------------------------------------------'
81 */
82[_LOWER] = LAYOUT_ortho_4x12(
83 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
84 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
85 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
86 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
87),
88
89/* Raise
90 * ,-----------------------------------------------------------------------------------.
91 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
92 * |------+------+------+------+------+-------------+------+------+------+------+------|
93 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
94 * |------+------+------+------+------+------|------+------+------+------+------+------|
95 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
96 * |------+------+------+------+------+------+------+------+------+------+------+------|
97 * | | | | | | | | Prev | Vol- | Mute | Stop |
98 * `-----------------------------------------------------------------------------------'
99 */
100[_RAISE] = LAYOUT_ortho_4x12(
101 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
102 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
103 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
104 _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MUTE, KC_MSTP
105),
106
107/* Adjust (Lower + Raise)
108 * ,-----------------------------------------------------------------------------------.
109 * | | | | | | | | | | | | |
110 * |------+------+------+------+------+-------------+------+------+------+------+------|
111 * | | | | | | | |Qwerty|Colemk| | | |
112 * |------+------+------+------+------+------|------+------+------+------+------+------|
113 * | | | | | | | | | | | | |
114 * |------+------+------+------+------+------+------+------+------+------+------+------|
115 * | | | | | | | | | | | AuSh |
116 * `-----------------------------------------------------------------------------------'
117 */
118[_ADJUST] = LAYOUT_ortho_4x12(
119 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
120 _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______,
121 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
122 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ASTG
123)
124
125};
126
127bool process_record_user(uint16_t keycode, keyrecord_t *record) {
128 switch (keycode) {
129 case QWERTY:
130 if (record->event.pressed) {
131 set_single_persistent_default_layer(_QWERTY);
132 }
133 return false;
134 break;
135 case COLEMAK:
136 if (record->event.pressed) {
137 set_single_persistent_default_layer(_COLEMAK);
138 }
139 return false;
140 break;
141 case LOWER:
142 if (record->event.pressed) {
143 layer_on(_LOWER);
144 update_tri_layer(_LOWER, _RAISE, _ADJUST);
145 } else {
146 layer_off(_LOWER);
147 update_tri_layer(_LOWER, _RAISE, _ADJUST);
148 }
149 return false;
150 break;
151 case RAISE:
152 if (record->event.pressed) {
153 layer_on(_RAISE);
154 update_tri_layer(_LOWER, _RAISE, _ADJUST);
155 } else {
156 layer_off(_RAISE);
157 update_tri_layer(_LOWER, _RAISE, _ADJUST);
158 }
159 return false;
160 break;
161 }
162 return true;
163}