aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Reifschneider <sean@realgo.com>2016-08-19 14:42:41 -0600
committerSean Reifschneider <sean@realgo.com>2016-08-19 14:42:41 -0600
commit50531068b3aa1b4aced20a1488e3ae052925f651 (patch)
treefcd2066217c03c783adbf587985323dc701b187d
parent7bb9d7f0f9afded61ef968b62115e772651bb1b4 (diff)
downloadqmk_firmware-50531068b3aa1b4aced20a1488e3ae052925f651.tar.gz
qmk_firmware-50531068b3aa1b4aced20a1488e3ae052925f651.zip
Adding jafo layout.
-rw-r--r--keyboards/ergodox/keymaps/jafo/jafo-Notes10
-rw-r--r--keyboards/ergodox/keymaps/jafo/jafo-layout.pdfbin0 -> 185426 bytes
-rw-r--r--keyboards/ergodox/keymaps/jafo/jafo_highres.pngbin0 -> 179460 bytes
-rw-r--r--keyboards/ergodox/keymaps/jafo/keymap.c184
-rw-r--r--keyboards/ergodox/keymaps/jafo/readme.md20
5 files changed, 214 insertions, 0 deletions
diff --git a/keyboards/ergodox/keymaps/jafo/jafo-Notes b/keyboards/ergodox/keymaps/jafo/jafo-Notes
new file mode 100644
index 000000000..9376125e9
--- /dev/null
+++ b/keyboards/ergodox/keymaps/jafo/jafo-Notes
@@ -0,0 +1,10 @@
1These are notes on how to build and deploy the firmware to Ez, but they are
2from before the qmk restructuring.
3
4cd qmk_firmware/keyboard/ergodox_ez
5make KEYMAP=jafo
6cp ergodox_ez.hex keymaps/jafo/
7/tmp/teensy.64bit
8Open hex keymap file
9Program
10Upload
diff --git a/keyboards/ergodox/keymaps/jafo/jafo-layout.pdf b/keyboards/ergodox/keymaps/jafo/jafo-layout.pdf
new file mode 100644
index 000000000..189b49b12
--- /dev/null
+++ b/keyboards/ergodox/keymaps/jafo/jafo-layout.pdf
Binary files differ
diff --git a/keyboards/ergodox/keymaps/jafo/jafo_highres.png b/keyboards/ergodox/keymaps/jafo/jafo_highres.png
new file mode 100644
index 000000000..e3d7cef85
--- /dev/null
+++ b/keyboards/ergodox/keymaps/jafo/jafo_highres.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/jafo/keymap.c b/keyboards/ergodox/keymaps/jafo/keymap.c
new file mode 100644
index 000000000..c5f21bd82
--- /dev/null
+++ b/keyboards/ergodox/keymaps/jafo/keymap.c
@@ -0,0 +1,184 @@
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 MDIA 2 // media keys
8
9const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
10/* Keymap 0: Basic layer
11 *
12 * ,--------------------------------------------------. ,--------------------------------------------------.
13 * | Grv | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - |
14 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
15 * | = | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ |
16 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
17 * | Esc/Cmd| A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd |
18 * |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------|
19 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
20 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
21 * |Grv/L1| '" | Del | Left | Right| | Up | Down | [ | ] | ~L1 |
22 * `----------------------------------' `----------------------------------'
23 * ,-------------. ,-------------.
24 * |Ctrl/Esc| Alt| | Alt |Ctrl/Esc|
25 * ,------|------|------| |------+--------+------.
26 * | | | Home | | PgUp | | |
27 * | Space|Backsp|------| |------| Tab |Enter |
28 * | |ace | End | | PgDn | | |
29 * `--------------------' `----------------------'
30 */
31// If it accepts an argument (i.e, is a function), it doesn't need KC_.
32// Otherwise, it needs KC_*
33[BASE] = KEYMAP( // layer 0 : default
34 // left hand
35 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT,
36 KC_EQL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB),
37 GUI_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G,
38 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, TG(MDIA),
39 LT(SYMB,KC_GRV),KC_QUOT, KC_DELT, KC_LEFT,KC_RGHT,
40 CTL_T(KC_ESC), KC_LALT,
41 KC_HOME,
42 KC_SPC,KC_BSPC,KC_END,
43 // right hand
44 KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
45 TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
46 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT),
47 TG(MDIA), KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT,
48 KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1,
49 KC_LALT, CTL_T(KC_ESC),
50 KC_PGUP,
51 KC_PGDN,KC_TAB, KC_ENT
52 ),
53/* Keymap 1: Symbol Layer
54 *
55 * ,--------------------------------------------------. ,--------------------------------------------------.
56 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
57 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
58 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
59 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
60 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
61 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
62 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
63 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
64 * | | | | | | | | . | 0 | = | |
65 * `----------------------------------' `----------------------------------'
66 * ,-------------. ,-------------.
67 * | | | | | |
68 * ,------|------|------| |------+------+------.
69 * | | | | | | | |
70 * | | |------| |------| | |
71 * | | | | | | | |
72 * `--------------------' `--------------------'
73 */
74// SYMBOLS
75[SYMB] = KEYMAP(
76 // left hand
77 KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS,
78 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
79 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
80 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
81 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
82 KC_TRNS,KC_TRNS,
83 KC_TRNS,
84 KC_TRNS,KC_TRNS,KC_TRNS,
85 // right hand
86 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
87 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
88 KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS,
89 KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS,
90 KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS,
91 KC_TRNS, KC_TRNS,
92 KC_TRNS,
93 KC_TRNS, KC_TRNS, KC_TRNS
94),
95/* Keymap 2: Media and mouse keys
96 *
97 * ,--------------------------------------------------. ,--------------------------------------------------.
98 * | | | | | | | | | | | | | | | |
99 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
100 * | | | | MsUp | | | | | | | | | | | |
101 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
102 * | | |MsLeft|MsDown|MsRght| |------| |------| LEFT | DOWN | UP | RIGHT| | Play |
103 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
104 * | | | | | | | | | | | | Prev | Next | | |
105 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
106 * | | | Lclk | Mclk | Rclk | |VolUp |VolDn | Mute | | |
107 * `----------------------------------' `----------------------------------'
108 * ,-------------. ,-------------.
109 * | | | | | |
110 * ,------|------|------| |------+------+------.
111 * | | | | | | |Brwser|
112 * | | |------| |------| |Back |
113 * | | | | | | | |
114 * `--------------------' `--------------------'
115 */
116// MEDIA AND MOUSE
117[MDIA] = KEYMAP(
118 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
119 KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS,
120 KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,
121 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
122 KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN3, KC_BTN2,
123 KC_TRNS, KC_TRNS,
124 KC_TRNS,
125 KC_TRNS, KC_TRNS, KC_TRNS,
126 // right hand
127 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
128 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
129 KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, KC_MPLY,
130 KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS,
131 KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS,
132 KC_TRNS, KC_TRNS,
133 KC_TRNS,
134 KC_TRNS, KC_TRNS, KC_WBAK
135),
136};
137
138const uint16_t PROGMEM fn_actions[] = {
139 [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols)
140};
141
142const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
143{
144 // MACRODOWN only works in this function
145 switch(id) {
146 case 0:
147 if (record->event.pressed) {
148 register_code(KC_RSFT);
149 } else {
150 unregister_code(KC_RSFT);
151 }
152 break;
153 }
154 return MACRO_NONE;
155};
156
157// Runs just one time when the keyboard initializes.
158void matrix_init_user(void) {
159
160};
161
162// Runs constantly in the background, in a loop.
163void matrix_scan_user(void) {
164
165 uint8_t layer = biton32(layer_state);
166
167 ergodox_board_led_off();
168 ergodox_right_led_1_off();
169 ergodox_right_led_2_off();
170 ergodox_right_led_3_off();
171 switch (layer) {
172 // TODO: Make this relevant to the ErgoDox EZ.
173 case 1:
174 ergodox_right_led_1_on();
175 break;
176 case 2:
177 ergodox_right_led_2_on();
178 break;
179 default:
180 // none
181 break;
182 }
183
184};
diff --git a/keyboards/ergodox/keymaps/jafo/readme.md b/keyboards/ergodox/keymaps/jafo/readme.md
new file mode 100644
index 000000000..c870dfd05
--- /dev/null
+++ b/keyboards/ergodox/keymaps/jafo/readme.md
@@ -0,0 +1,20 @@
1# ErgoDox EZ "jafo" Configuration
2
3This is a layout based on the ErgoDox Ez default layout, but with some
4customizations I made for my use-case. I use Linux, vi and the i3 window
5manager, so I made these changes:
6
7- Arrow keys laid out in vi positions in media layer.
8
9- Esc (tap) and Win (held) to the left of A. i3 uses Win key for navigation
10 and having that be symmetric on the left and right makes it easier.
11
12- Grave accent below equals, I was having a hard time using ~
13
14- Layer 2 switch below the L1 switch, so I can go into a mode where I get
15 arrow keys under my vi motion fingers.
16
17- Making the Ctrl (held) and Esc (tap) on my thumbs symmetric. Not sure I
18 need that with the Esc left of A and Ctrl on the Z and / keys when held...
19
20![Jafo](jafo_highres.png)