aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboard/ergodox_ez/keymaps/maz/keymap.c229
-rw-r--r--keyboard/ergodox_ez/keymaps/maz/readme.md121
2 files changed, 350 insertions, 0 deletions
diff --git a/keyboard/ergodox_ez/keymaps/maz/keymap.c b/keyboard/ergodox_ez/keymaps/maz/keymap.c
new file mode 100644
index 000000000..7b8f0df74
--- /dev/null
+++ b/keyboard/ergodox_ez/keymaps/maz/keymap.c
@@ -0,0 +1,229 @@
1#include "ergodox_ez.h"
2#include "debug.h"
3#include "action_layer.h"
4
5#define BASE 0 // default layer
6#define SYMB 1 // symbols
7#define ARRW 2 // arrow keys
8#define MDIA 3 // media keys, including mouse
9
10const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
11/* Keymap 0: Basic layer
12 *
13 * ,--------------------------------------------------. ,--------------------------------------------------.
14 * | = | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | - |
15 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
16 * | Tab | Q | W | E | R | T | L1 | | CAPS | Y | U | I | O | P | \ |
17 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
18 * | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
19 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
20 * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
21 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
22 * | | Grv | |*SYMB*|*ARRW*| |*MDIA*|*SYMB*| [ | ] | |
23 * `----------------------------------' `----------------------------------'
24 * ,-------------. ,-------------.
25 * | | | | | |
26 * ,------|------|------| |------+--------+------.
27 * | | | | | | | |
28 * | Space| Bksp |------| |------| Tab |Enter |
29 * | ctrl | gui | Alt | | Alt | gui | ctrl |
30 * `--------------------' `----------------------'
31 */
32 // TODO: maybe look into changing the delay or whatever for the holding macros... not sure which way you would go with this. if the macro automatically kicks in if you hold it and press another button (no matter how long you held it for), then it wouldn't hurt to have a longer period i think... although if you hold a button and then decide not to, then you;ll register a space/bksp/etc. on accident. on the other hand, if it's too short of a delay, then you might be able to register spc/bksp/etc quickly enough, although i don't see this as big of an issue
33 // not sure if gui is meta key or super... it says meta on the basic keycodes page, and i think that's consitent with other shit, but you should really figure out how to program the keyboard to have meta and super separately instead of hacking your init.el to recognize alt as meta... because shit will get fucked up beteween awesome and emacs and other shit i'm guessing
34// If it accepts an argument (i.e, is a function), it doesn't need KC_.
35// Otherwise, it needs KC_*
36[BASE] = KEYMAP( // layer 0 : default
37 // left hand
38 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS,
39 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
40 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G,
41 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
42 KC_TRNS, KC_GRV, KC_TRNS,MO(SYMB),MO(ARRW),
43 KC_TRNS, KC_TRNS,
44 KC_TRNS,
45 CTL_T(KC_SPC),GUI_T(KC_BSPC),KC_LALT,
46 // right hand
47 KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
48 KC_CAPSLOCK, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
49 KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
50 MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
51 MO(MDIA), MO(SYMB), KC_LBRC,KC_RBRC, KC_TRNS,
52 KC_TRNS, KC_TRNS,
53 KC_TRNS,
54 KC_RALT,GUI_T(KC_TAB), CTL_T(KC_ENT)
55 ),
56/* Keymap 1: Symbol Layer
57 *
58 * ,--------------------------------------------------. ,--------------------------------------------------.
59 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
60 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
61 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
62 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
63 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | . |
64 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
65 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
66 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
67 * | | | | | | | | | 0 | = | |
68 * `----------------------------------' `----------------------------------'
69 * ,-------------. ,-------------.
70 * | | | | | |
71 * ,------|------|------| |------+------+------.
72 * | | | | | | | |
73 * | | |------| |------| | |
74 * | | | | | | | |
75 * `--------------------' `--------------------'
76 */
77// SYMBOLS
78[SYMB] = KEYMAP(
79 // left hand
80 KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
81 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
82 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
83 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
84 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
85 KC_TRNS,KC_TRNS,
86 KC_TRNS,
87 KC_TRNS,KC_TRNS,KC_TRNS,
88 // right hand
89 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
90 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
91 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_DOT,
92 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
93 KC_TRNS,KC_TRNS, KC_0, KC_EQL, KC_TRNS,
94 KC_TRNS, KC_TRNS,
95 KC_TRNS,
96 KC_TRNS, KC_TRNS, KC_TRNS
97),
98/* Keymap 2: Arrow keys
99 *
100 * ,--------------------------------------------------. ,--------------------------------------------------.
101 * | | | | | | | | | | | | | | | |
102 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
103 * | | | | | | | | | | |PGDOWN| PGUP | | | |
104 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
105 * | | | | | | |------| |------| LEFT | DOWN | UP |RIGHT | | |
106 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
107 * | | | | | | | | | | | HOME | END | | | |
108 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
109 * | | | | | | | | | | | |
110 * `----------------------------------' `----------------------------------'
111 * ,-------------. ,-------------.
112 * | | | | | |
113 * ,------|------|------| |------+------+------.
114 * | | | | | | | |
115 * | | |------| |------| | |
116 * | | | | | | | |
117 * `--------------------' `--------------------'
118 */
119// MEDIA AND MOUSE
120[ARRW] = KEYMAP(
121 // left hand
122 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
123 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
124 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
125 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
126 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
127 KC_TRNS, KC_TRNS,
128 KC_TRNS,
129 KC_TRNS, KC_TRNS, KC_TRNS,
130 // right hand
131 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
132 KC_TRNS, KC_TRNS, KC_PGDOWN, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS,
133 KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_TRNS,
134 KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, KC_TRNS, KC_TRNS,
135 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
136 KC_TRNS, KC_TRNS,
137 KC_TRNS,
138 KC_TRNS, KC_TRNS, KC_TRNS
139),
140/* Keymap 3: Media and mouse keys
141 *
142 * ,--------------------------------------------------. ,--------------------------------------------------.
143 * | | | | | | | | | | | | | | | |
144 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
145 * | | | | MsUp | | | | | | | | | | | |
146 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
147 * | | |MsLeft|MsDown|MsRght| |------| |------| | Lclk | Rclk | | | |
148 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
149 * | | |Mute |VolDn | VolUp| | | | | | | | | | |
150 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
151 * | | | Prev | Play | Next | | | | | | |
152 * `----------------------------------' `----------------------------------'
153 * ,-------------. ,-------------.
154 * | | | | | |
155 * ,------|------|------| |------+------+------.
156 * |Brwser| | | | | | |
157 * |Back | |------| |------| | |
158 * | | | | | | | |
159 * `--------------------' `--------------------'
160 */
161// MEDIA AND MOUSE
162[MDIA] = KEYMAP(
163 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
164 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
165 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
166 KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS,
167 KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT,
168 KC_TRNS, KC_TRNS,
169 KC_TRNS,
170 KC_WBAK, KC_TRNS, KC_TRNS,
171 // right hand
172 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
173 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
174 KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_MPLY,
175 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
176 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
177 KC_TRNS, KC_TRNS,
178 KC_TRNS,
179 KC_TRNS, KC_TRNS, KC_TRNS
180),
181};
182
183const uint16_t PROGMEM fn_actions[] = {
184 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
185};
186
187const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
188{
189 // MACRODOWN only works in this function
190 switch(id) {
191 case 0:
192 if (record->event.pressed) {
193 register_code(KC_RSFT);
194 } else {
195 unregister_code(KC_RSFT);
196 }
197 break;
198 }
199 return MACRO_NONE;
200};
201
202// Runs just one time when the keyboard initializes.
203void matrix_init_user(void) {
204
205};
206
207// Runs constantly in the background, in a loop.
208void matrix_scan_user(void) {
209
210 uint8_t layer = biton32(layer_state);
211
212 ergodox_board_led_off();
213 ergodox_right_led_1_off();
214 ergodox_right_led_2_off();
215 ergodox_right_led_3_off();
216 switch (layer) {
217 // TODO: Make this relevant to the ErgoDox EZ.
218 case 1:
219 ergodox_right_led_1_on();
220 break;
221 case 2:
222 ergodox_right_led_2_on();
223 break;
224 default:
225 // none
226 break;
227 }
228
229};
diff --git a/keyboard/ergodox_ez/keymaps/maz/readme.md b/keyboard/ergodox_ez/keymaps/maz/readme.md
new file mode 100644
index 000000000..000a8d000
--- /dev/null
+++ b/keyboard/ergodox_ez/keymaps/maz/readme.md
@@ -0,0 +1,121 @@
1# Introduction
2
3## Motivation
4I created this keymap in an attempt to optimize my typing experience in text editors (vim and emacs) and the command-line.
5
6More specifically, I wanted to have each modifier key controlled by the thumbs, the most powerful of the digits (I think). This cured me of emacs pinky, which had surprisingly grown quite quickly over the first two weeks of using emacs & emacs-like commands on the command-line.
7
8## Changes
9There are some miscellaneous changes that I kind of forgot I made, such as moving the tilde key, but you can check out the visual layouts below, which I **have** kept up to date.
10### Modifier Keys
11The biggest changes from the ergodox ez default keymap are the modifiers on the thumb cluster. You must hold each key down for a certain amount of time (forgot where this is specified) in order for the modifier key to activate.
12
13### Layers
14* an arrow layer (ARRW) has been created because the default arrow keys suck. Beware, these do use vim bindings because they're the best.
15* the keys in the media layer have been moved around for a better experience (imo), especially with respect to the mouse
16* the three layers (SYMB, MDIA, and ARRW) now have their own dedicated keys accessible by the thumbs in the basic layer
17* caps lock has been put in place of the right-side `L1` toggle key because there was really no need to have two keys to toggle one layer, and caps lock is useful when writing queries
18** unfortunatley, caps lock is not indicated by an LED, so be careful. I use caps lock just like I do insert in vim; for a short burst of text. I always turn off caps lock when I change my focus
19
20### Removal Of Keys
21I also removed a bunch of unnecessary keys that I wasn't going to use anyway. You'll see such keys are blank in the basic layer. I will probably add some more keys in place of these, but I'm fine for now; I just didn't want the distraction of extra keys I barely use.
22
23## Caveats
24### Thumb Cluster Range
25I've heard many complaints about the thumb clusters. I agree that the three outter keys are almost impossible to reach. I am going to try to build [Matt Adereth's keyboard](https://github.com/adereth/dactyl-keyboard), which looks to have a better layout. However, I am able to comfortably use the three modifier keys mainly because:
26* I use DCS keycaps with SA Row 3 keycaps where the Alt keys are
27* I have relatively large hands (I guarantee you there's no problem - I guarantee you)
28
29### Dangerous positioning
30I think it's quite dangerous to put something like control on the same key as enter. Alas, this is a risk I'm willing to accept, and so should you if you decide to use this keymap. I tend to avoid putting myself in situtations in which disaster could occur with one fell swoop of a keypress.
31
32# Keymap
33## Keymap 0: Basic layer
34```
35,--------------------------------------------------. ,--------------------------------------------------.
36| = | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | - |
37|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
38| Tab | Q | W | E | R | T | L1 | | CAPS | Y | U | I | O | P | \ |
39|--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
40| ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | ' |
41|--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
42| LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift |
43`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
44 | | Grv | |*SYMB*|*ARRW*| |*MDIA*|*SYMB*| [ | ] | |
45 `----------------------------------' `----------------------------------'
46 ,-------------. ,-------------.
47 | | | | | |
48 ,------|------|------| |------+--------+------.
49 | | | | | | | |
50 | Space| Bksp |------| |------| Tab |Enter |
51 | ctrl | gui | Alt | | Alt | gui | ctrl |
52 `--------------------' `----------------------'
53
54```
55
56## Keymap 1: Symbol Layer
57The only change here is the *dot* (`.`) character moving from next to `0` next to `+` in order to move the layer keys in the correct position
58```
59 ,--------------------------------------------------. ,--------------------------------------------------.
60 | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
61 |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
62 | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
63 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
64 | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | . |
65 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
66 | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
67 `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
68 | | | | | | | | | 0 | = | |
69 `----------------------------------' `----------------------------------'
70 ,-------------. ,-------------.
71 | | | | | |
72 ,------|------|------| |------+------+------.
73 | | | | | | | |
74 | | |------| |------| | |
75 | | | | | | | |
76 `--------------------' `--------------------'
77```
78
79## Keymap 2: Arrow Layer
80```
81 ,--------------------------------------------------. ,--------------------------------------------------.
82 | | | | | | | | | | | | | | | |
83 |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
84 | | | | | | | | | | |PGDOWN| PGUP | | | |
85 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
86 | | | | | | |------| |------| LEFT | DOWN | UP |RIGHT | | |
87 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
88 | | | | | | | | | | | HOME | END | | | |
89 `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
90 | | | | | | | | | | | |
91 `----------------------------------' `----------------------------------'
92 ,-------------. ,-------------.
93 | | | | | |
94 ,------|------|------| |------+------+------.
95 | | | | | | | |
96 | | |------| |------| | |
97 | | | | | | | |
98 `--------------------' `--------------------'
99```
100
101## Keymap 3: Media and mouse keys
102```
103 ,--------------------------------------------------. ,--------------------------------------------------.
104 | | | | | | | | | | | | | | | |
105 |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
106 | | | | MsUp | | | | | | | | | | | |
107 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
108 | | |MsLeft|MsDown|MsRght| |------| |------| | Lclk | Rclk | | | |
109 |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
110 | | |Mute |VolDn | VolUp| | | | | | | | | | |
111 `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
112 | | | Prev | Play | Next | | | | | | |
113 `----------------------------------' `----------------------------------'
114 ,-------------. ,-------------.
115 | | | | | |
116 ,------|------|------| |------+------+------.
117 |Brwser| | | | | | |
118 |Back | |------| |------| | |
119 | | | | | | | |
120 `--------------------' `--------------------'
121```