aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/ergodox/ergodox.c24
-rw-r--r--keyboards/ergodox/keymaps/kastyle/keymap.c77
-rw-r--r--keyboards/ergodox/keymaps/kastyle/readme.md14
-rw-r--r--keyboards/ergodox/rules.mk1
4 files changed, 80 insertions, 36 deletions
diff --git a/keyboards/ergodox/ergodox.c b/keyboards/ergodox/ergodox.c
index e69de29bb..c88c1ad89 100644
--- a/keyboards/ergodox/ergodox.c
+++ b/keyboards/ergodox/ergodox.c
@@ -0,0 +1,24 @@
1#include "ergodox.h"
2#include "debug.h"
3#include "action_layer.h"
4
5// swap-hands action needs a matrix to define the swap
6const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
7 /* Left hand, matrix positions */
8 {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}},
9 {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}},
10 {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}},
11 {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}},
12 {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}},
13 {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}},
14 {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}},
15 /* Right hand, matrix positions */
16 {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}},
17 {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}},
18 {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}},
19 {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}},
20 {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}},
21 {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}},
22 {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}},
23};
24
diff --git a/keyboards/ergodox/keymaps/kastyle/keymap.c b/keyboards/ergodox/keymaps/kastyle/keymap.c
index a92085003..467996686 100644
--- a/keyboards/ergodox/keymaps/kastyle/keymap.c
+++ b/keyboards/ergodox/keymaps/kastyle/keymap.c
@@ -1,3 +1,6 @@
1/* Setup to approximate a Kinesis Advantage with an eye to use in a
2 * Mac/OSX environment
3 * This version adds a hand swap feature to flip the keyboard */
1#include "ergodox.h" 4#include "ergodox.h"
2#include "debug.h" 5#include "debug.h"
3#include "action_layer.h" 6#include "action_layer.h"
@@ -18,10 +21,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| 21 * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------|
19 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | 22 * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift |
20 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 23 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
21 * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | 24 * |Grv/L1| \ |AltShf| Left | Right| | Up | Down | [ | ] |Grv/L1|
22 * `----------------------------------' `----------------------------------' 25 * `----------------------------------' `----------------------------------'
23 * ,---------------. ,---------------. 26 * ,---------------. ,---------------.
24 * |Ctrl/Esc| Alt | | Alt |Ctrl/Esc| 27 * | LGUI |Al/Esc| |Al/Esc| RGUI |
25 * ,------|--------|------| |------+--------+------. 28 * ,------|--------|------| |------+--------+------.
26 * | | | Home | | PgUp | | | 29 * | | | Home | | PgUp | | |
27 * |Backsp| Del |------| |------| Enter | Space| 30 * |Backsp| Del |------| |------| Enter | Space|
@@ -31,33 +34,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31// If it accepts an argument (i.e, is a function), it doesn't need KC_. 34// If it accepts an argument (i.e, is a function), it doesn't need KC_.
32// Otherwise, it needs KC_* 35// Otherwise, it needs KC_*
33[BASE] = KEYMAP( // layer 0 : default 36[BASE] = KEYMAP( // layer 0 : default
34 // left hand 37 // left hand
35 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, 38 KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI,
36 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), 39 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1),
37 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, 40 KC_LCTL, 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, ALL_T(KC_NO), 41 KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO),
39 LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, 42 KC_FN1, KC_BSLS, LALT(KC_LSFT), KC_LEFT, KC_RGHT,
40 CTL_T(KC_ESC), ALT_T(KC_APP), 43 KC_LGUI, ALT_T(KC_ESC),
41 KC_HOME, 44 KC_HOME,
42 KC_BSPC,KC_DEL,KC_END, 45 KC_BSPC, KC_DEL, KC_END,
43 // right hand 46 // right hand
44 KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, 47 KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
45 TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, 48 TG(1), 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),KC_QUOT, 49 KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT,
47 MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, 50 MEH_T(KC_NO), 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, 51 KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1,
49 KC_LALT, CTL_T(KC_ESC), 52 ALT_T(KC_ESC), KC_RGUI,
50 KC_PGUP, 53 KC_PGUP,
51 KC_PGDN,KC_ENT, KC_SPC 54 KC_PGDN, KC_ENT, KC_SPC
52 ), 55),
56
53/* Keymap 1: Symbol Layer 57/* Keymap 1: Symbol Layer
54 * 58 *
55 * ,--------------------------------------------------. ,--------------------------------------------------. 59 * ,--------------------------------------------------. ,--------------------------------------------------.
56 * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | 60 * | PrScr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 |
57 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| 61 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
58 * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | 62 * | ScrLk | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 |
59 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 63 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
60 * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | 64 * | Pause | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | |
61 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 65 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
62 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | 66 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
63 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 67 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
@@ -74,14 +78,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
74// SYMBOLS 78// SYMBOLS
75[SYMB] = KEYMAP( 79[SYMB] = KEYMAP(
76 // left hand 80 // left hand
77 KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, 81 KC_PSCR, 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, 82 KC_SLCK, 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, 83 KC_PAUS, 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, 84 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, 85 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
82 KC_TRNS,KC_TRNS, 86 KC_TRNS, KC_TRNS,
83 KC_TRNS, 87 KC_TRNS,
84 KC_TRNS,KC_TRNS,KC_TRNS, 88 KC_TRNS, KC_TRNS, KC_TRNS,
85 // right hand 89 // right hand
86 KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, 90 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, 91 KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12,
@@ -92,6 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
92 KC_TRNS, 96 KC_TRNS,
93 KC_TRNS, KC_TRNS, KC_TRNS 97 KC_TRNS, KC_TRNS, KC_TRNS
94), 98),
99
95/* Keymap 2: Media and mouse keys 100/* Keymap 2: Media and mouse keys
96 * 101 *
97 * ,--------------------------------------------------. ,--------------------------------------------------. 102 * ,--------------------------------------------------. ,--------------------------------------------------.
@@ -135,10 +140,6 @@ KEYMAP(
135), 140),
136}; 141};
137 142
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) 143const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
143{ 144{
144 // MACRODOWN only works in this function 145 // MACRODOWN only works in this function
@@ -154,6 +155,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
154 return MACRO_NONE; 155 return MACRO_NONE;
155}; 156};
156 157
158const uint16_t PROGMEM fn_actions[] = {
159 [1] = ACTION_SWAP_HANDS_TAP_KEY(KC_GRV) // FN1 - Tap = Grave/Tilde - Hold Momentary swap hands
160};
161
157// Runs just one time when the keyboard initializes. 162// Runs just one time when the keyboard initializes.
158void matrix_init_user(void) { 163void matrix_init_user(void) {
159 164
diff --git a/keyboards/ergodox/keymaps/kastyle/readme.md b/keyboards/ergodox/keymaps/kastyle/readme.md
new file mode 100644
index 000000000..944286a81
--- /dev/null
+++ b/keyboards/ergodox/keymaps/kastyle/readme.md
@@ -0,0 +1,14 @@
1The kastyle keymap was originally intended to remap the ErgoDox EZ to more
2closely approximate the layout of a Kinesis Advantage. Notable changes
3over the stock ErgoDox layout include:
4
5 * Re-arragnement of tab, enter, space, and delete to match the Kinesis
6 * Addition of print screen, pause, etc. keys following the kines-ish keymap
7 on L1
8 * GUI keys have replaced Ctrl on the thumb keys (for Mac use), and Alt keys
9 are mapped to allow Esc on tap (good for Vi users)
10 * Most notably, the addition of a momentary one-handed mode for quick and
11 easy access to keys on the other half of the keyboard, e.g. while using a
12 mouse in one hand, one may add text to a dialogue box with the other without
13 having to reach across the keyboard or remove one's hand from the mouse.
14
diff --git a/keyboards/ergodox/rules.mk b/keyboards/ergodox/rules.mk
index ac63d4eff..add64ec76 100644
--- a/keyboards/ergodox/rules.mk
+++ b/keyboards/ergodox/rules.mk
@@ -26,3 +26,4 @@ SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
26NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work 26NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
27MIDI_ENABLE ?= no # MIDI controls 27MIDI_ENABLE ?= no # MIDI controls
28UNICODE_ENABLE ?= yes # Unicode 28UNICODE_ENABLE ?= yes # Unicode
29ONEHAND_ENABLE ?= yes # Allow swapping hands of keyboard