aboutsummaryrefslogtreecommitdiff
path: root/keyboards/40percentclub/nori/keymaps/default/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/40percentclub/nori/keymaps/default/keymap.c')
-rw-r--r--keyboards/40percentclub/nori/keymaps/default/keymap.c159
1 files changed, 159 insertions, 0 deletions
diff --git a/keyboards/40percentclub/nori/keymaps/default/keymap.c b/keyboards/40percentclub/nori/keymaps/default/keymap.c
new file mode 100644
index 000000000..3d379a8af
--- /dev/null
+++ b/keyboards/40percentclub/nori/keymaps/default/keymap.c
@@ -0,0 +1,159 @@
1#include QMK_KEYBOARD_H
2
3// Each layer gets a name for readability, which is then used in the keymap matrix below.
4// The underscores don't mean anything - you can have a layer called STUFF or any other name.
5// Layer names don't all need to be of the same length, obviously, and you can also skip them
6// entirely and just use numbers.
7#define _QWERTY 0
8#define _COLEMAK 1
9#define _DVORAK 2
10#define _LOWER 3
11#define _RAISE 4
12#define _ADJUST 16
13
14enum custom_keycodes {
15 QWERTY = SAFE_RANGE,
16 COLEMAK,
17 DVORAK,
18};
19
20#define LOWER MO(_LOWER)
21#define RAISE MO(_RAISE)
22#define ADJUST MO(_ADJUST)
23
24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25/* Qwerty
26 * ,-----------------------------------------------------------------------------------.
27 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
28 * |------+------+------+------+------+-------------+------+------+------+------+------|
29 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
30 * |------+------+------+------+------+------|------+------+------+------+------+------|
31 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
32 * |------+------+------+------+------+------+------+------+------+------+------+------|
33 * |Adjust| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
34 * `-----------------------------------------------------------------------------------'
35 */
36[_QWERTY] = LAYOUT_ortho_4x12(
37 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
38 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
39 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
40 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
41),
42
43/* Colemak
44 * ,-----------------------------------------------------------------------------------.
45 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
46 * |------+------+------+------+------+-------------+------+------+------+------+------|
47 * | Esc | A | R | S | T | D | H | N | E | I | O | ' |
48 * |------+------+------+------+------+------|------+------+------+------+------+------|
49 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
50 * |------+------+------+------+------+------+------+------+------+------+------+------|
51 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
52 * `-----------------------------------------------------------------------------------'
53 */
54[_COLEMAK] = LAYOUT_ortho_4x12(
55 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
56 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
57 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
58 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
59),
60
61/* Dvorak
62 * ,-----------------------------------------------------------------------------------.
63 * | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp |
64 * |------+------+------+------+------+-------------+------+------+------+------+------|
65 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
66 * |------+------+------+------+------+------|------+------+------+------+------+------|
67 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
68 * |------+------+------+------+------+------+------+------+------+------+------+------|
69 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
70 * `-----------------------------------------------------------------------------------'
71 */
72[_DVORAK] = LAYOUT_ortho_4x12(
73 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
74 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
75 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
76 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
77),
78
79/* Lower
80 * ,-----------------------------------------------------------------------------------.
81 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del |
82 * |------+------+------+------+------+-------------+------+------+------+------+------|
83 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
84 * |------+------+------+------+------+------|------+------+------+------+------+------|
85 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | | |
86 * |------+------+------+------+------+------+------+------+------+------+------+------|
87 * | | | | | | | | Next | Vol- | Vol+ | Play |
88 * `-----------------------------------------------------------------------------------'
89 */
90[_LOWER] = LAYOUT_ortho_4x12(
91 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
92 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
93 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______,
94 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
95),
96
97/* Raise
98 * ,-----------------------------------------------------------------------------------.
99 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del |
100 * |------+------+------+------+------+-------------+------+------+------+------+------|
101 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
102 * |------+------+------+------+------+------|------+------+------+------+------+------|
103 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | | |
104 * |------+------+------+------+------+------+------+------+------+------+------+------|
105 * | | | | | | | | Next | Vol- | Vol+ | Play |
106 * `-----------------------------------------------------------------------------------'
107 */
108[_RAISE] = LAYOUT_ortho_4x12(
109 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
110 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
111 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______,
112 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
113),
114
115/* Adjust (Lower + Raise)
116 * ,-----------------------------------------------------------------------------------.
117 * | | Reset| | | | | | | | | | Del |
118 * |------+------+------+------+------+-------------+------+------+------+------+------|
119 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
120 * |------+------+------+------+------+------|------+------+------+------+------+------|
121 * | | | | | | | | | | | | |
122 * |------+------+------+------+------+------+------+------+------+------+------+------|
123 * | | | | | | | | | | | |
124 * `-----------------------------------------------------------------------------------'
125 */
126[_ADJUST] = LAYOUT_ortho_4x12(
127 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL,
128 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______,
129 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
130 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
131)
132
133
134};
135
136layer_state_t layer_state_set_user(layer_state_t state) {
137 return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
138}
139
140bool process_record_user(uint16_t keycode, keyrecord_t *record) {
141 switch (keycode) {
142 case QWERTY:
143 if (record->event.pressed) {
144 set_single_persistent_default_layer(_QWERTY);
145 }
146 return false;
147 case COLEMAK:
148 if (record->event.pressed) {
149 set_single_persistent_default_layer(_COLEMAK);
150 }
151 return false;
152 case DVORAK:
153 if (record->event.pressed) {
154 set_single_persistent_default_layer(_DVORAK);
155 }
156 return false;
157 }
158 return true;
159}