diff options
-rw-r--r-- | keyboards/minidox/keymaps/haegin/keymap.c | 92 | ||||
-rw-r--r-- | layouts/community/ergodox/haegin/keymap.c | 196 | ||||
-rw-r--r-- | layouts/community/ergodox/haegin/readme.md | 5 |
3 files changed, 293 insertions, 0 deletions
diff --git a/keyboards/minidox/keymaps/haegin/keymap.c b/keyboards/minidox/keymaps/haegin/keymap.c new file mode 100644 index 000000000..64a18c1b9 --- /dev/null +++ b/keyboards/minidox/keymaps/haegin/keymap.c | |||
@@ -0,0 +1,92 @@ | |||
1 | #include "minidox.h" | ||
2 | #include "action_layer.h" | ||
3 | #include "eeconfig.h" | ||
4 | |||
5 | extern keymap_config_t keymap_config; | ||
6 | |||
7 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
8 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
9 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
10 | // entirely and just use numbers. | ||
11 | #define LETTERS 0 | ||
12 | #define SYMBOLS 1 | ||
13 | #define MEDIA 2 | ||
14 | |||
15 | // Fillers to make layering more clear | ||
16 | #define _______ KC_TRNS | ||
17 | #define XXXXXXX KC_NO | ||
18 | |||
19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
20 | |||
21 | /* Qwerty | ||
22 | * | ||
23 | * ,----------------------------------. ,----------------------------------. | ||
24 | * | Q | W | E | R | T | | Y | U | I | O | P | | ||
25 | * |------+------+------+------+------| |------+------+------+------+------| | ||
26 | * | A | S | D | F | G | | H | J | K | L | ; | | ||
27 | * |------+------+------+------+------| |------+------+------+------+------| | ||
28 | * | Z | X | C | V | B | | N | M | , | . | / | | ||
29 | * `----------------------------------' `----------------------------------' | ||
30 | * ,--------------------. ,------,-------------. | ||
31 | * | Ctrl | LOWER| | | | RAISE| Shift| | ||
32 | * `-------------| Space| |BckSpc|------+------. | ||
33 | * | | | | | ||
34 | * `------' `------' | ||
35 | */ | ||
36 | [LETTERS] = KEYMAP( \ | ||
37 | KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, \ | ||
38 | KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, \ | ||
39 | KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, \ | ||
40 | CTL_T(KC_ESC), SFT_T(KC_BSPC), GUI_T(KC_SPC), LT(SYMBOLS, KC_ENT), LT(MEDIA, KC_TAB), ALT_T(LCTL(KC_B)) \ | ||
41 | ), | ||
42 | |||
43 | /* Raise | ||
44 | * | ||
45 | * ,----------------------------------. ,----------------------------------. | ||
46 | * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | ||
47 | * |------+------+------+------+------| |------+------+------+------+------| | ||
48 | * | Tab | Left | Down | Up | Right| | | - | = | [ | ] | | ||
49 | * |------+------+------+------+------| |------+------+------+------+------| | ||
50 | * | Ctrl| ` | GUI | Alt | | | | | | \ | ' | | ||
51 | * `----------------------------------' `----------------------------------' | ||
52 | * ,--------------------. ,------,-------------. | ||
53 | * | | LOWER| | | | RAISE| | | ||
54 | * `-------------| | | |------+------. | ||
55 | * | | | | | ||
56 | * `------' `------' | ||
57 | */ | ||
58 | [SYMBOLS] = KEYMAP( \ | ||
59 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ | ||
60 | KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \ | ||
61 | KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, \ | ||
62 | _______, _______, _______, _______, _______, _______ \ | ||
63 | ), | ||
64 | |||
65 | /* Lower | ||
66 | * | ||
67 | * ,----------------------------------. ,----------------------------------. | ||
68 | * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | ||
69 | * |------+------+------+------+------| |------+------+------+------+------| | ||
70 | * | Esc | | | | | | | _ | + | { | } | | ||
71 | * |------+------+------+------+------| |------+------+------+------+------| | ||
72 | * | Caps| ~ | | | | | | | | | | " | | ||
73 | * `----------------------------------' `----------------------------------' | ||
74 | * ,--------------------. ,------,-------------. | ||
75 | * | | LOWER| | | | RAISE| Del | | ||
76 | * `-------------| | | Enter|------+------. | ||
77 | * | | | | | ||
78 | * `------' `------' | ||
79 | */ | ||
80 | [MEDIA] = KEYMAP( \ | ||
81 | KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ | ||
82 | KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \ | ||
83 | KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, \ | ||
84 | _______, _______, _______, KC_ENT, _______, KC_DEL \ | ||
85 | ) | ||
86 | }; | ||
87 | |||
88 | void persistant_default_layer_set(uint16_t default_layer) { | ||
89 | eeconfig_update_default_layer(default_layer); | ||
90 | default_layer_set(default_layer); | ||
91 | } | ||
92 | |||
diff --git a/layouts/community/ergodox/haegin/keymap.c b/layouts/community/ergodox/haegin/keymap.c new file mode 100644 index 000000000..56aee727d --- /dev/null +++ b/layouts/community/ergodox/haegin/keymap.c | |||
@@ -0,0 +1,196 @@ | |||
1 | // Netable differences vs. the default firmware for the ErgoDox EZ: | ||
2 | // 1. The Cmd key is now on the right side, making Cmd+Space easier. | ||
3 | // 2. The media keys work on OSX (But not on Windows). | ||
4 | #include QMK_KEYBOARD_H | ||
5 | #include "debug.h" | ||
6 | #include "action_layer.h" | ||
7 | |||
8 | #define BASE 0 // default layer | ||
9 | #define SYMBOLS 1 // symbols | ||
10 | #define MEDIA 2 // media keys | ||
11 | |||
12 | #define _______ KC_TRNS | ||
13 | |||
14 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
15 | |||
16 | /* Keymap 0: Basic layer | ||
17 | * | ||
18 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
19 | * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | | ||
20 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
21 | * | / | Q | W | E | R | T | | | | Y | U | I | O | P | \ | | ||
22 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
23 | * | Ctl/Esc| A | S | D | F | G |------| |------| H | J | K | L |; / L2| LGui | | ||
24 | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| | ||
25 | * | LShift | Z | X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | | ||
26 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
27 | * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | | ||
28 | * `----------------------------------' `----------------------------------' | ||
29 | * ,-------------. ,-------------. | ||
30 | * | App | LGui | | Alt |Ctrl/Esc| | ||
31 | * ,------|------|------| |------+--------+------. | ||
32 | * | | | Home | | PgUp | | | | ||
33 | * | Space|Backsp|------| |------| Tab |Enter | | ||
34 | * | |ace | End | | PgDn | | | | ||
35 | * `--------------------' `----------------------' | ||
36 | */ | ||
37 | // If it accepts an argument (i.e, is a function), it doesn't need KC_. | ||
38 | // Otherwise, it needs KC_* | ||
39 | |||
40 | [BASE] = LAYOUT_ergodox( // layer 0 : default | ||
41 | // Left hand | ||
42 | KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, | ||
43 | KC_SLSH, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, | ||
44 | CTL_T(KC_ESC), KC_A, KC_O, KC_E, KC_U, KC_I, | ||
45 | KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), | ||
46 | LT(SYMBOLS,KC_GRV), KC_QUOT, KC_SLSH, KC_LALT, SFT_T(KC_RGHT), | ||
47 | KC_HOME, KC_END, | ||
48 | KC_PGUP, | ||
49 | GUI_T(KC_SPC), CTL_T(KC_BSPC), LGUI(KC_SPC), | ||
50 | |||
51 | // Right hand | ||
52 | KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, LGUI(KC_SPC), | ||
53 | KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L, LT(MEDIA, KC_BSLS), | ||
54 | KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, | ||
55 | MEH_T(KC_NO), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, | ||
56 | ALT_T(KC_UP), KC_DOWN, KC_LBRC, KC_RBRC, KC_FN2, | ||
57 | KC_PGUP, CTL_T(KC_ESC), | ||
58 | KC_PGDN, | ||
59 | LCTL(KC_B), LT(MEDIA, KC_TAB), LT(SYMBOLS, KC_ENT) | ||
60 | ), | ||
61 | |||
62 | |||
63 | /* Keymap 1: Symbol Layer | ||
64 | * | ||
65 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
66 | * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | | ||
67 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
68 | * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | | ||
69 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
70 | * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | | ||
71 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
72 | * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | | ||
73 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
74 | * | | | | | | | | . | 0 | = | | | ||
75 | * `----------------------------------' `----------------------------------' | ||
76 | * ,-------------. ,-------------. | ||
77 | * | | | | | | | ||
78 | * ,------|------|------| |------+------+------. | ||
79 | * | | | | | | | | | ||
80 | * | | |------| |------| | | | ||
81 | * | | | | | | | | | ||
82 | * `--------------------' `--------------------' | ||
83 | */ | ||
84 | // SYMBOLS | ||
85 | |||
86 | [SYMBOLS] = LAYOUT_ergodox( | ||
87 | // left hand | ||
88 | _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, | ||
89 | _______,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,_______, | ||
90 | _______,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, | ||
91 | _______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,_______, | ||
92 | _______,_______,_______,_______,_______, | ||
93 | _______,_______, | ||
94 | _______, | ||
95 | _______,_______,_______, | ||
96 | // right hand | ||
97 | _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, | ||
98 | _______, KC_EQL, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, | ||
99 | KC_MINS, KC_4, KC_5, KC_6, KC_PLUS, _______, | ||
100 | _______, KC_AMPR, KC_1, KC_2, KC_3, KC_SLSH, _______, | ||
101 | _______,KC_0, KC_DOT, KC_EQL, _______, | ||
102 | _______, _______, | ||
103 | _______, | ||
104 | _______, _______, _______ | ||
105 | ), | ||
106 | |||
107 | /* Keymap 2: Media and mouse keys | ||
108 | * | ||
109 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
110 | * | | | | | | | | | | | | | | | | | ||
111 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
112 | * | | | | MsUp | | | | | | | | ↑ | | | | | ||
113 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
114 | * | | |MsLeft|MsDown|MsRght| |------| |------|VolUp | ← | ↓ | → | | Play | | ||
115 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
116 | * | | | | | | | | | |VolDn | Prev | Play | Next | | | | ||
117 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
118 | * | | | | Lclk | Rclk | | Mute | | | | | | ||
119 | * `----------------------------------' `----------------------------------' | ||
120 | * ,-------------. ,-------------. | ||
121 | * | | | | | | | ||
122 | * ,------|------|------| |------+------+------. | ||
123 | * | | | | | | |Brwser| | ||
124 | * | | |------| |------| |Back | | ||
125 | * | | | | | | | | | ||
126 | * `--------------------' `--------------------' | ||
127 | */ | ||
128 | // MEDIA AND MOUSE | ||
129 | [MEDIA] = LAYOUT_ergodox( | ||
130 | _______, _______, _______, _______, _______, _______, _______, | ||
131 | _______, _______, _______, KC_MS_U, _______, _______, _______, | ||
132 | _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, | ||
133 | _______, _______, _______, _______, _______, _______, _______, | ||
134 | _______, _______, _______, KC_BTN1, KC_BTN2, | ||
135 | _______, _______, | ||
136 | _______, | ||
137 | _______, _______, _______, | ||
138 | // right hand | ||
139 | _______, _______, _______, _______, _______, _______, _______, | ||
140 | _______, _______, _______, KC_UP, _______, _______, _______, | ||
141 | KC_VOLU, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MPLY, | ||
142 | _______, KC_VOLD, KC_MPRV, KC_MPLY, KC_MFFD, _______, _______, | ||
143 | KC_MUTE, _______, _______, _______, _______, | ||
144 | _______, _______, | ||
145 | _______, | ||
146 | _______, _______, KC_WBAK | ||
147 | ), | ||
148 | }; | ||
149 | |||
150 | const uint16_t PROGMEM fn_actions[] = { | ||
151 | [1] = ACTION_LAYER_TAP_TOGGLE(SYMBOLS) // FN1 - Momentary Layer 1 (Symbols) | ||
152 | }; | ||
153 | |||
154 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
155 | { | ||
156 | // MACRODOWN only works in this function | ||
157 | switch(id) { | ||
158 | case 0: | ||
159 | if (record->event.pressed) { | ||
160 | register_code(KC_RSFT); | ||
161 | } else { | ||
162 | unregister_code(KC_RSFT); | ||
163 | } | ||
164 | break; | ||
165 | } | ||
166 | return MACRO_NONE; | ||
167 | }; | ||
168 | |||
169 | // Runs just one time when the keyboard initializes. | ||
170 | void matrix_init_user(void) { | ||
171 | |||
172 | }; | ||
173 | |||
174 | // Runs constantly in the background, in a loop. | ||
175 | void matrix_scan_user(void) { | ||
176 | |||
177 | uint8_t layer = biton32(layer_state); | ||
178 | |||
179 | ergodox_board_led_off(); | ||
180 | ergodox_right_led_1_off(); | ||
181 | ergodox_right_led_2_off(); | ||
182 | ergodox_right_led_3_off(); | ||
183 | switch (layer) { | ||
184 | // TODO: Make this relevant to the ErgoDox EZ. | ||
185 | case 1: | ||
186 | ergodox_right_led_1_on(); | ||
187 | break; | ||
188 | case 2: | ||
189 | ergodox_right_led_3_on(); | ||
190 | break; | ||
191 | default: | ||
192 | // none | ||
193 | break; | ||
194 | } | ||
195 | |||
196 | }; | ||
diff --git a/layouts/community/ergodox/haegin/readme.md b/layouts/community/ergodox/haegin/readme.md new file mode 100644 index 000000000..15e7f2441 --- /dev/null +++ b/layouts/community/ergodox/haegin/readme.md | |||
@@ -0,0 +1,5 @@ | |||
1 | # Haegin's Ergodox Firmware | ||
2 | |||
3 | Mostly uses keys available on the Minidox, with some extras that are nice | ||
4 | to have when they're available, provided they're in a roughly similar place on | ||
5 | the Model 01. | ||