aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErez Zukerman <bulk@ezuk.org>2016-06-22 09:01:51 -0400
committerGitHub <noreply@github.com>2016-06-22 09:01:51 -0400
commit8c1bfdf0bd9aae13d8722fd107deca40ffc7932c (patch)
tree0eba6a7ccd873cbfbc75e2fa3ebc34041eb17140
parent98f0807359cfa78d25442b91ff4c5bbfc5679661 (diff)
parent2278956412ca7f970dc4d38a6c32d7b5301f9a90 (diff)
downloadqmk_firmware-8c1bfdf0bd9aae13d8722fd107deca40ffc7932c.tar.gz
qmk_firmware-8c1bfdf0bd9aae13d8722fd107deca40ffc7932c.zip
Merge pull request #433 from algernon/ergodox-ez/algernon
ergodox_ez: Update the algernon keymap to v1.2
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/Makefile18
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/config.h2
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/images/base-layer.pngbin96845 -> 105162 bytes
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/images/emacs-layer.pngbin114267 -> 0 bytes
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/images/experimental-layer.pngbin96956 -> 105172 bytes
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/images/hun-layer.pngbin78720 -> 67924 bytes
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/images/nav-n-media-layer.pngbin0 -> 94837 bytes
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/images/one-handed-layer.pngbin85970 -> 91140 bytes
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/images/steno-layer.pngbin65146 -> 69557 bytes
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/keymap.c486
-rw-r--r--keyboards/ergodox_ez/keymaps/algernon/readme.md176
11 files changed, 351 insertions, 331 deletions
diff --git a/keyboards/ergodox_ez/keymaps/algernon/Makefile b/keyboards/ergodox_ez/keymaps/algernon/Makefile
index 3db507c8f..cd7e9e9d2 100644
--- a/keyboards/ergodox_ez/keymaps/algernon/Makefile
+++ b/keyboards/ergodox_ez/keymaps/algernon/Makefile
@@ -2,6 +2,24 @@ BOOTMAGIC_ENABLE=no
2COMMAND_ENABLE=no 2COMMAND_ENABLE=no
3SLEEP_LED_ENABLE=no 3SLEEP_LED_ENABLE=no
4UNICODE_ENABLE=no 4UNICODE_ENABLE=no
5FORCE_NKRO ?= yes
6
7ifeq (${FORCE_NKRO},yes)
8OPT_DEFS += -DFORCE_NKRO
9endif
10
11KEYMAP_VERSION = $(shell \
12 if [ -d "${KEYMAP_PATH}/.git" ]; then \
13 cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \
14 else echo QMK; fi)
15
16KEYMAP_BRANCH = $(shell \
17 if [ -d "${KEYMAP_PATH}/.git" ]; then \
18 cd "${KEYMAP_PATH}"; \
19 fi; \
20 git rev-parse --abbrev-ref HEAD 2>/dev/null)
21
22OPT_DEFS += -DKEYMAP_VERSION=\"$(KEYMAP_VERSION)\\\#$(KEYMAP_BRANCH)\"
5 23
6ifndef QUANTUM_DIR 24ifndef QUANTUM_DIR
7 include ../../../../Makefile 25 include ../../../../Makefile
diff --git a/keyboards/ergodox_ez/keymaps/algernon/config.h b/keyboards/ergodox_ez/keymaps/algernon/config.h
index 4cb878ebc..9bb1025be 100644
--- a/keyboards/ergodox_ez/keymaps/algernon/config.h
+++ b/keyboards/ergodox_ez/keymaps/algernon/config.h
@@ -24,6 +24,4 @@
24#undef LEADER_TIMEOUT 24#undef LEADER_TIMEOUT
25#define LEADER_TIMEOUT 1000 25#define LEADER_TIMEOUT 1000
26 26
27#define FORCE_NKRO
28
29#endif 27#endif
diff --git a/keyboards/ergodox_ez/keymaps/algernon/images/base-layer.png b/keyboards/ergodox_ez/keymaps/algernon/images/base-layer.png
index 1a7c0f480..c4e298b6b 100644
--- a/keyboards/ergodox_ez/keymaps/algernon/images/base-layer.png
+++ b/keyboards/ergodox_ez/keymaps/algernon/images/base-layer.png
Binary files differ
diff --git a/keyboards/ergodox_ez/keymaps/algernon/images/emacs-layer.png b/keyboards/ergodox_ez/keymaps/algernon/images/emacs-layer.png
deleted file mode 100644
index 1aa23cc00..000000000
--- a/keyboards/ergodox_ez/keymaps/algernon/images/emacs-layer.png
+++ /dev/null
Binary files differ
diff --git a/keyboards/ergodox_ez/keymaps/algernon/images/experimental-layer.png b/keyboards/ergodox_ez/keymaps/algernon/images/experimental-layer.png
index c5e695b8c..81155851b 100644
--- a/keyboards/ergodox_ez/keymaps/algernon/images/experimental-layer.png
+++ b/keyboards/ergodox_ez/keymaps/algernon/images/experimental-layer.png
Binary files differ
diff --git a/keyboards/ergodox_ez/keymaps/algernon/images/hun-layer.png b/keyboards/ergodox_ez/keymaps/algernon/images/hun-layer.png
index f1e5f9ec0..104a9544d 100644
--- a/keyboards/ergodox_ez/keymaps/algernon/images/hun-layer.png
+++ b/keyboards/ergodox_ez/keymaps/algernon/images/hun-layer.png
Binary files differ
diff --git a/keyboards/ergodox_ez/keymaps/algernon/images/nav-n-media-layer.png b/keyboards/ergodox_ez/keymaps/algernon/images/nav-n-media-layer.png
new file mode 100644
index 000000000..16d29e124
--- /dev/null
+++ b/keyboards/ergodox_ez/keymaps/algernon/images/nav-n-media-layer.png
Binary files differ
diff --git a/keyboards/ergodox_ez/keymaps/algernon/images/one-handed-layer.png b/keyboards/ergodox_ez/keymaps/algernon/images/one-handed-layer.png
index 283559b3a..698d11e5f 100644
--- a/keyboards/ergodox_ez/keymaps/algernon/images/one-handed-layer.png
+++ b/keyboards/ergodox_ez/keymaps/algernon/images/one-handed-layer.png
Binary files differ
diff --git a/keyboards/ergodox_ez/keymaps/algernon/images/steno-layer.png b/keyboards/ergodox_ez/keymaps/algernon/images/steno-layer.png
index e747bfb41..fe3c03c93 100644
--- a/keyboards/ergodox_ez/keymaps/algernon/images/steno-layer.png
+++ b/keyboards/ergodox_ez/keymaps/algernon/images/steno-layer.png
Binary files differ
diff --git a/keyboards/ergodox_ez/keymaps/algernon/keymap.c b/keyboards/ergodox_ez/keymaps/algernon/keymap.c
index 4eea6874c..fdc63a813 100644
--- a/keyboards/ergodox_ez/keymaps/algernon/keymap.c
+++ b/keyboards/ergodox_ez/keymaps/algernon/keymap.c
@@ -15,13 +15,14 @@
15 15
16enum { 16enum {
17 BASE = 0, 17 BASE = 0,
18 EXPRM,
19 ARRW,
18 APPSEL, 20 APPSEL,
19 HUN, 21 HUN,
20 EMACS, 22 NMDIA,
21 OHLFT, 23 OHLFT,
22 OHRGT, 24 OHRGT,
23 PLVR, 25 PLVR,
24 EXPRM
25}; 26};
26 27
27/* Macros */ 28/* Macros */
@@ -33,7 +34,6 @@ enum {
33 A_PLVR, 34 A_PLVR,
34 A_ESC, 35 A_ESC,
35 A_MPN, 36 A_MPN,
36 A_COLN,
37 37
38 // Function / number keys 38 // Function / number keys
39 KF_1, // 1, F1 39 KF_1, // 1, F1
@@ -61,17 +61,6 @@ enum {
61 A_MDL, 61 A_MDL,
62 A_MDR, 62 A_MDR,
63 63
64 // Emacs layer keys
65 AE_VIS, // Visual mode
66 AE_PSTDEL, // Paste/Delete
67 AE_CPYC, // Copy/Cut
68 AE_EMACS, // Emacs copy & paste mode
69 AE_TERM, // Terminal copy & paste mode
70 AE_OTHER, // Other copy & paste mode
71 AE_INS, // Insert mode
72 AE_OVR, // Overwrite mode
73 AE_APPND, // Append
74
75 // Hungarian layer keys 64 // Hungarian layer keys
76 HU_AA, // Á 65 HU_AA, // Á
77 HU_OO, // Ó 66 HU_OO, // Ó
@@ -102,11 +91,13 @@ enum {
102 F_CTRL 91 F_CTRL
103}; 92};
104 93
105/* States & timers */ 94/* Custom keycodes */
95
96enum {
97 CT_CLN = 0x7101
98};
106 99
107uint8_t m_visual_state = 0; 100/* States & timers */
108static uint16_t m_cutdel_timer;
109static uint16_t m_copypaste_timer;
110 101
111uint16_t gui_timer = 0; 102uint16_t gui_timer = 0;
112 103
@@ -123,13 +114,8 @@ uint16_t oh_left_blink_timer = 0;
123uint8_t oh_right_blink = 0; 114uint8_t oh_right_blink = 0;
124uint16_t oh_right_blink_timer = 0; 115uint16_t oh_right_blink_timer = 0;
125 116
126enum { 117uint8_t ct_cln_count = 0;
127 CP_EMACS = 0, 118uint16_t ct_cln_timer = 0;
128 CP_TERM = 1,
129 CP_OTHER = 2,
130};
131
132uint8_t cp_mode = CP_EMACS;
133 119
134/* The Keymap */ 120/* The Keymap */
135 121
@@ -138,18 +124,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
138/* Keymap 0: Base Layer 124/* Keymap 0: Base Layer
139 * 125 *
140 * ,-----------------------------------------------------. ,-----------------------------------------------------. 126 * ,-----------------------------------------------------. ,-----------------------------------------------------.
141 * | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | 127 * | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | 1HND | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 |
142 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 128 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
143 * | Next/Prev | ' | , | . | P | Y | [ | | ] | F | G | C | R | L | = | 129 * | Next/Prev | ' | , | . | P | Y | [ | | ] | F | G | C | R | L | \ |
144 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| 130 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
145 * | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | \ | 131 * | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | = |
146 * |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------| 132 * |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------|
147 * | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop | 133 * | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop |
148 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' 134 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
149 * | Home | End | Down | Up | : | | - | Left | Right| PgUp | PgDn | 135 * | | | Left | Up | : | | - | Down | Rght | | |
150 * `-----------------------------------' `-----------------------------------' 136 * `-----------------------------------' `-----------------------------------'
151 * ,-------------. ,-------------. 137 * ,-------------. ,-------------.
152 * | LAlt | GUI | |EMACS | 1HND | 138 * | LAlt | GUI | | MDIA | ARRW |
153 * ,------|------|------| |------+------+------. 139 * ,------|------|------| |------+------+------.
154 * | | | Ctrl | | LEAD | | | 140 * | | | Ctrl | | LEAD | | |
155 * |Backsp|LShift|------| |------| Enter| Space| 141 * |Backsp|LShift|------| |------| Enter| Space|
@@ -162,25 +148,116 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
162,M(A_MPN) ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC 148,M(A_MPN) ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC
163,KC_TAB ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I 149,KC_TAB ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I
164,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,KC_LPRN 150,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,KC_LPRN
165,KC_HOME ,KC_END ,KC_DOWN ,KC_UP ,M(A_COLN) 151,KC_NO ,KC_NO ,KC_LEFT ,KC_UP ,CT_CLN
166 152
167 ,F(F_ALT),F(F_GUI) 153 ,F(F_ALT),F(F_GUI)
168 ,F(F_CTRL) 154 ,F(F_CTRL)
169 ,KC_BSPC,F(F_SFT),M(A_ESC) 155 ,KC_BSPC,F(F_SFT),M(A_ESC)
170 156
171 // right hand 157 // right hand
172 ,KC_APP ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 158 ,M(OH_LEFT),M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
173 ,KC_RBRC ,KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_EQL 159 ,KC_RBRC ,KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS
174 ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_BSLS 160 ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL
175 ,KC_RPRN ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP 161 ,KC_RPRN ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP
176 ,KC_MINS,KC_LEFT,KC_RGHT ,KC_PGUP ,KC_PGDN 162 ,KC_MINS,KC_DOWN,KC_RGHT ,KC_NO ,KC_NO
177 163
178 ,OSL(EMACS),M(OH_LEFT) 164 ,OSL(NMDIA),OSL(ARRW)
179 ,KC_LEAD 165 ,KC_LEAD
180 ,F(F_HUN),KC_ENT ,KC_SPC 166 ,F(F_HUN) ,KC_ENT ,KC_SPC
181 ), 167 ),
182 168
183/* Keymap 1: Application select layer 169/* Keymap 1: Experimental layer
170 *
171 * ,-----------------------------------------------------. ,-----------------------------------------------------.
172 * | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | 1HND | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 |
173 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
174 * | Next/Prev | ' | , | . | P | Y | [ | | ] | L | F | C | R | J | = |
175 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
176 * | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | \ |
177 * |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------|
178 * | Play/Pause| Z | G | V | K | X | | | | Q | M | W | B | / | Stop |
179 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
180 * | | | Left | Up | : | | - | Down | Rght | | |
181 * `-----------------------------------' `-----------------------------------'
182 * ,-------------. ,-------------.
183 * | LAlt | GUI | | MDIA | ARRW |
184 * ,------|------|------| |------+------+------.
185 * | | | Ctrl | | LEAD | | |
186 * |Backsp|LShift|------| |------| Enter| Space|
187 * | | | ESC | | HUN | | |
188 * `--------------------' `--------------------'
189 */
190[EXPRM] = KEYMAP(
191// left hand
192 KC_GRV ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
193,M(A_MPN) ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC
194,KC_TAB ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I
195,KC_MPLY ,KC_Z ,KC_G ,KC_V ,KC_K ,KC_X ,KC_LPRN
196,KC_NO ,KC_NO ,KC_LEFT ,KC_UP ,CT_CLN
197
198 ,F(F_ALT),F(F_GUI)
199 ,F(F_CTRL)
200 ,KC_BSPC,F(F_SFT),M(A_ESC)
201
202 // right hand
203 ,M(OH_LEFT),M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
204 ,KC_RBRC ,KC_L ,KC_F ,KC_C ,KC_R ,KC_J ,KC_BSLS
205 ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL
206 ,KC_RPRN ,KC_Q ,KC_M ,KC_W ,KC_B ,KC_SLSH ,KC_MSTP
207 ,KC_MINS,KC_DOWN,KC_RGHT ,KC_NO ,KC_NO
208
209 ,OSL(NMDIA),OSL(ARRW)
210 ,KC_LEAD
211 ,F(F_HUN) ,KC_ENT ,KC_SPC
212 ),
213
214/* Keymap 2: Arrow layer
215 *
216 * ,-----------------------------------------------------. ,-----------------------------------------------------.
217 * | | | | | | | | | | | | | | | |
218 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
219 * | | | | | | | | | | | | | | | |
220 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
221 * | | | | | | |------| |------| | | | | | |
222 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
223 * | | | | | | | | | | | | | | | |
224 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
225 * | | | Home | PgUp | | | | PgDn | End | | |
226 * `----------------------------------' `----------------------------------'
227 * ,-------------. ,-------------.
228 * | | | | | |
229 * ,------|------|------| |------+------+------.
230 * | | | | | | | |
231 * | | |------| |------| | |
232 * | | | | | | | |
233 * `--------------------' `--------------------'
234 */
235
236[ARRW] = KEYMAP(
237// left hand
238 KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
239,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
240,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
241,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
242,KC_TRNS ,KC_TRNS ,KC_HOME ,KC_PGUP ,KC_TRNS
243
244 ,KC_TRNS ,KC_TRNS
245 ,KC_TRNS
246 ,KC_TRNS ,KC_TRNS ,KC_TRNS
247
248 // right hand
249 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
250 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
251 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
252 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
253 ,KC_TRNS ,KC_PGDN ,KC_END ,KC_TRNS ,KC_TRNS
254
255 ,KC_TRNS ,KC_TRNS
256 ,KC_TRNS
257 ,KC_TRNS ,KC_TRNS ,KC_TRNS
258 ),
259
260/* Keymap 3: Application select layer
184 * 261 *
185 * ,-----------------------------------------------------. ,-----------------------------------------------------. 262 * ,-----------------------------------------------------. ,-----------------------------------------------------.
186 * | |Music |Slack |Emacs |Term |Chrome| | | | | | | | | | 263 * | |Music |Slack |Emacs |Term |Chrome| | | | | | | | | |
@@ -227,7 +304,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
227 ), 304 ),
228 305
229 306
230/* Keymap 2: Hungarian Layer 307/* Keymap 4: Hungarian Layer
231 * 308 *
232 * ,-----------------------------------------------------. ,-----------------------------------------------------. 309 * ,-----------------------------------------------------. ,-----------------------------------------------------.
233 * | | | | | | | | | | | | | | | | 310 * | | | | | | | | | | | | | | | |
@@ -251,73 +328,73 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
251 328
252[HUN] = KEYMAP( 329[HUN] = KEYMAP(
253// left hand 330// left hand
254 KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_TRNS 331 KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
255,KC_NO ,KC_NO ,M(HU_OEE),KC_NO ,M(HU_UEE),KC_NO ,KC_NO 332,KC_NO ,KC_NO ,M(HU_OEE),KC_NO ,M(HU_UEE),KC_NO ,KC_NO
256,KC_NO ,M(HU_AA),M(HU_OO) ,M(HU_EE),M(HU_UU) ,M(HU_II) 333,KC_NO ,M(HU_AA),M(HU_OO) ,M(HU_EE),M(HU_UU) ,M(HU_II)
257,KC_TRNS ,KC_NO ,M(HU_OE) ,KC_NO ,M(HU_UE) ,KC_NO ,KC_NO 334,KC_NO ,KC_NO ,M(HU_OE) ,KC_NO ,M(HU_UE) ,KC_NO ,KC_NO
258,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO 335,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
259 336
260 ,KC_TRNS ,KC_TRNS 337 ,KC_NO ,KC_NO
261 ,KC_TRNS 338 ,KC_NO
262 ,KC_TRNS ,KC_TRNS ,KC_TRNS 339 ,KC_NO ,KC_TRNS ,KC_TRNS
263 340
264 // right hand 341 // right hand
265 ,KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 342 ,KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
266 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 343 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
267 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 344 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
268 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 345 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
269 ,KC_NO ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS 346 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
270 347
271 ,KC_NO ,KC_NO 348 ,KC_NO ,KC_NO
272 ,KC_NO 349 ,KC_NO
273 ,F(F_BSE),KC_TRNS ,KC_TRNS 350 ,F(F_BSE),KC_TRNS ,KC_TRNS
274 ), 351 ),
275 352
276/* Keymap 3: Spacemacs layer 353/* Keymap 5: Navigation & Media layer
277 * 354 *
278 * ,-----------------------------------------------------. ,-----------------------------------------------------. 355 * ,-----------------------------------------------------. ,-----------------------------------------------------.
279 * | MS Slow | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 |ScrLCK| |ScrLCK| 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | 356 * | MS Slow | | | | | |ScrLCK| |ScrLCK| | | | | | |
280 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 357 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
281 * | MS Normal | | Home | Up | PgUp | |Visual| |Scroll| $ |MsUpL | MsUp |MsUpR | R |PrintScreen| 358 * | MS Normal | | Home | Up | PgUp | | | |Scroll| |MsUpL | MsUp |MsUpR | |PrintScreen|
282 * |-----------+------+------+------+------+------| Mode | | Up |------+------+------+------+------+-----------| 359 * |-----------+------+------+------+------+------| | | Up |------+------+------+------+------+-----------|
283 * | MS Fast |APPEND| Left | Down | Right| INS |------| |------| D |MsLeft| MsDn |MsRght| | | 360 * | MS Fast | | Left | Down | Right| |------| |------| |MsLeft| MsDn |MsRght| | |
284 * |-----------+------+------+------+------+------| Cut | |Scroll|------+------+------+------+------+-----------| 361 * |-----------+------+------+------+------+------| | |Scroll|------+------+------+------+------+-----------|
285 * | Play/Pause| | End | Down | PgDn | X | Copy | | Down | |MsDnL | W |MsDnR | | Stop | 362 * | Play/Pause| | End | Down | PgDn | | | | Down | |MsDnL | MsDn |MsDnR | | Stop |
286 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' 363 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
287 * |EmacsM|TermM |OtherM| | | |Vol Up|Vol Dn| Mute | | | 364 * | | | | | | | | | | | |
288 * `----------------------------------' `----------------------------------' 365 * `----------------------------------' `----------------------------------'
289 * ,-------------. ,-------------. 366 * ,-------------. ,-------------.
290 * | Alt | GUI | | BASE | MClk | 367 * | Mute | VlUp | | BASE | MClk |
291 * ,------|------|------| |------+------+------. 368 * ,------|------|------| |------+------+------.
292 * |Delete| | Ctrl | | Prev |Left |Right | 369 * | | | VlDn | | Prev |Left |Right |
293 * | |LShift|------| |------| Click| Click| 370 * | SPC | Enter|------| |------| Click| Click|
294 * |Paste | | ESC | | Next | | | 371 * | | | ESC | | Next | | |
295 * `--------------------' `--------------------' 372 * `--------------------' `--------------------'
296 */ 373 */
297[EMACS] = KEYMAP( 374[NMDIA] = KEYMAP(
298// left hand 375// left hand
299 KC_ACL0 ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,LGUI(KC_L) 376 KC_ACL0 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L)
300,KC_ACL1 ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,M(AE_VIS) 377,KC_ACL1 ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO
301,KC_ACL2 ,M(AE_APPND) ,KC_LEFT ,KC_DOWN ,KC_RIGHT,M(AE_INS) 378,KC_ACL2 ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO
302,KC_MPLY ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_X ,M(AE_CPYC) 379,KC_MPLY ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_NO
303,M(AE_EMACS),M(AE_TERM) ,M(AE_OTHER),KC_NO ,KC_NO 380,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
304 ,KC_TRNS ,KC_TRNS 381 ,KC_MUTE ,KC_VOLU
305 ,KC_TRNS 382 ,KC_VOLD
306 ,M(AE_PSTDEL),KC_TRNS ,KC_TRNS 383 ,KC_SPC,KC_ENTER,M(A_ESC)
307 384
308 // right hand 385 // right hand
309 ,LGUI(KC_L),M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_11) 386 ,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
310 ,KC_WH_U ,KC_DLR ,M(A_MUL),KC_MS_U ,M(A_MUR),M(AE_OVR),KC_PSCR 387 ,KC_WH_U ,KC_NO ,M(A_MUL),KC_MS_U ,M(A_MUR),KC_NO ,KC_PSCR
311 ,KC_D ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO 388 ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO
312 ,KC_WH_D ,KC_NO ,M(A_MDL),KC_W ,M(A_MDR),KC_NO ,KC_MSTP 389 ,KC_WH_D ,KC_NO ,M(A_MDL),KC_MS_D ,M(A_MDR),KC_NO ,KC_MSTP
313 ,KC_VOLU ,KC_VOLD ,KC_MUTE ,KC_NO ,KC_NO 390 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
314 391
315 ,KC_TRNS ,KC_MS_BTN3 392 ,KC_TRNS ,KC_MS_BTN3
316 ,KC_MPRV 393 ,KC_MPRV
317 ,KC_MNXT ,KC_BTN1 ,KC_BTN2 394 ,KC_MNXT ,KC_BTN1 ,KC_BTN2
318 ), 395 ),
319 396
320/* Keymap 5: One-handed, left side 397/* Keymap 6: One-handed, left side
321 * 398 *
322 * ,-----------------------------------------------------. 399 * ,-----------------------------------------------------.
323 * | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 |A BSE| 400 * | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 |A BSE|
@@ -362,7 +439,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
362 ,KC_NO ,KC_NO ,KC_NO 439 ,KC_NO ,KC_NO ,KC_NO
363 ), 440 ),
364 441
365/* Keymap 6: One-handed, right side 442/* Keymap 7: One-handed, right side
366 * 443 *
367 * ,-----------------------------------------------------. 444 * ,-----------------------------------------------------.
368 * | = F11 | 0 F10| 9 F9 | 8 F8 | 7 F7 | 6 F6 |A BSE| 445 * | = F11 | 0 F10| 9 F9 | 8 F8 | 7 F7 | 6 F6 |A BSE|
@@ -407,15 +484,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
407 ,KC_NO ,KC_NO ,KC_NO 484 ,KC_NO ,KC_NO ,KC_NO
408 ), 485 ),
409 486
410/* Keymap 7: Steno for Plover 487/* Keymap 8: Steno for Plover
411 * 488 *
412 * ,--------------------------------------------------. ,--------------------------------------------------. 489 * ,--------------------------------------------------. ,--------------------------------------------------.
413 * | | | | | | | BASE | | | | | | | | | 490 * | | | | | | | BASE | | | | | | | | |
414 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| 491 * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------|
415 * | | # | # | # | # | # | | | | # | # | # | # | # | # | 492 * | | # | # | # | # | # | # | | # | # | # | # | # | # | # |
416 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 493 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
417 * | | | T | P | H | |------| |------| | F | P | L | T | D | 494 * | | | T | P | H | |------| |------| | F | P | L | T | D |
418 * |--------+ S +------+------+------+ * | | | | * +------+------+------+------+--------| 495 * |--------+ S +------+------+------+ * | * | | * | * +------+------+------+------+--------|
419 * | | | K | W | R | | | | | | R | B | G | S | Z | 496 * | | | K | W | R | | | | | | R | B | G | S | Z |
420 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 497 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
421 * | | | | | | | | | | | | 498 * | | | | | | | | | | | |
@@ -432,9 +509,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
432[PLVR] = KEYMAP( 509[PLVR] = KEYMAP(
433// left hand 510// left hand
434KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR), 511KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR),
435KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, KC_NO, 512KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM,
436KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, 513KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR,
437KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, KC_NO, 514KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR,
438KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 515KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
439 KC_NO, KC_NO, 516 KC_NO, KC_NO,
440 KC_NO, 517 KC_NO,
@@ -442,61 +519,15 @@ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
442 519
443 // right hand 520 // right hand
444 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 521 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
445 KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, 522 PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM,
446 PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, 523 PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD,
447 KC_NO, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, 524 PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ,
448 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, 525 KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
449 KC_NO, KC_NO, 526 KC_NO, KC_NO,
450 KC_NO, 527 KC_NO,
451 KC_NO,PV_E, PV_U 528 KC_NO,PV_E, PV_U
452 ), 529 ),
453 530
454/* Keymap 8: Experimental layer
455 *
456 * ,-----------------------------------------------------. ,-----------------------------------------------------.
457 * | `~ | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 |
458 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
459 * | Next/Prev | ' | , | . | P | Y | [ | | ] | Q | F | C | R | J | = |
460 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
461 * | Tab | A | O | E | U | I |------| |------| D | H | T | N | S | \ |
462 * |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------|
463 * | Play/Pause| Z | K | V | G | X | | | | L | M | W | B | / | Stop |
464 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
465 * | Home | End | Down | Up | : | | - | Left | Right| PgUp | PgDn |
466 * `-----------------------------------' `-----------------------------------'
467 * ,-------------. ,-------------.
468 * | LAlt | GUI | |EMACS | 1HND |
469 * ,------|------|------| |------+------+------.
470 * | | | Ctrl | | LEAD | | |
471 * |Backsp|LShift|------| |------| Enter| Space|
472 * | | | ESC | | HUN | | |
473 * `--------------------' `--------------------'
474 */
475[EXPRM] = KEYMAP(
476// left hand
477 KC_GRV ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR)
478,M(A_MPN) ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC
479,KC_TAB ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I
480,KC_MPLY ,KC_Z ,KC_K ,KC_V ,KC_G ,KC_X ,KC_LPRN
481,KC_HOME ,KC_END ,KC_DOWN ,KC_UP ,M(A_COLN)
482
483 ,F(F_ALT),F(F_GUI)
484 ,F(F_CTRL)
485 ,KC_BSPC,F(F_SFT),M(A_ESC)
486
487 // right hand
488 ,KC_APP ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11
489 ,KC_RBRC ,KC_Q ,KC_F ,KC_C ,KC_R ,KC_J ,KC_EQL
490 ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_BSLS
491 ,KC_RPRN ,KC_L ,KC_M ,KC_W ,KC_B ,KC_SLSH ,KC_MSTP
492 ,KC_MINS,KC_LEFT,KC_RGHT ,KC_PGUP ,KC_PGDN
493
494 ,OSL(EMACS),M(OH_LEFT)
495 ,KC_LEAD
496 ,F(F_HUN),KC_ENT ,KC_SPC
497 ),
498
499
500}; 531};
501 532
502const uint16_t PROGMEM fn_actions[] = { 533const uint16_t PROGMEM fn_actions[] = {
@@ -616,26 +647,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
616 } 647 }
617 break; 648 break;
618 649
619 case A_COLN:
620 if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
621 ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
622 int oneshot = ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out());
623
624 if (record->event.pressed) {
625 if (oneshot)
626 clear_oneshot_mods ();
627 unregister_code (KC_LSFT);
628
629 register_code (KC_SCLN);
630 unregister_code (KC_SCLN);
631 if (!oneshot)
632 register_code (KC_LSFT);
633 }
634 } else {
635 return MACRODOWN (D(RSFT), T(SCLN), U(RSFT), END);
636 }
637 break;
638
639 case A_MPN: 650 case A_MPN:
640 if (record->event.pressed) { 651 if (record->event.pressed) {
641 if (keyboard_report->mods & MOD_BIT(KC_LSFT) || 652 if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
@@ -722,126 +733,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
722 mousekey_send(); 733 mousekey_send();
723 break; 734 break;
724 735
725 /* EMACS layer stuff */
726 case AE_EMACS:
727 if (record->event.pressed) {
728 cp_mode = CP_EMACS;
729 }
730 break;
731
732 case AE_TERM:
733 if (record->event.pressed) {
734 cp_mode = CP_TERM;
735 }
736 break;
737
738 case AE_OTHER:
739 if (record->event.pressed) {
740 cp_mode = CP_OTHER;
741 }
742 break;
743
744 case AE_VIS:
745 if (cp_mode == CP_EMACS && record->event.pressed) {
746 return MACRO(T(V), END);
747 }
748 break;
749
750 case AE_CPYC:
751 if (record->event.pressed) {
752 m_copypaste_timer = timer_read ();
753 } else {
754 if (timer_elapsed (m_copypaste_timer) > TAPPING_TERM) {
755 // Long press: Cut
756 switch (cp_mode) {
757 case CP_EMACS:
758 return MACRO(T(X), END);
759 break;
760 case CP_TERM:
761 return MACRO(D(RCTRL), D(RSFT), T(X), U(RSFT), U(RCTRL), END);
762 break;
763 case CP_OTHER:
764 return MACRO(D(RCTRL), T(X), U(RCTRL), END);
765 break;
766 }
767 } else {
768 // Short press: Copy
769 switch (cp_mode) {
770 case CP_EMACS:
771 return MACRO(T(Y), END);
772 break;
773 case CP_TERM:
774 return MACRO(D(RCTRL), D(RSFT), T(C), U(RSFT), U(RCTRL), END);
775 break;
776 case CP_OTHER:
777 return MACRO(D(RCTRL), T(C), U(RCTRL), END);
778 break;
779 }
780 }
781 }
782 break;
783
784 case AE_PSTDEL:
785 if (record->event.pressed) {
786 m_cutdel_timer = timer_read ();
787 } else {
788 if (timer_elapsed (m_cutdel_timer) > TAPPING_TERM) {
789 // Long press: Delete
790 switch (cp_mode) {
791 case CP_EMACS:
792 return MACRO(T(D), END);
793 break;
794 case CP_TERM:
795 case CP_OTHER:
796 return MACRO(T(DEL), END);
797 break;
798 }
799 } else {
800 // Short press: Paste
801 switch (cp_mode) {
802 case CP_EMACS:
803 if (keyboard_report->mods & MOD_BIT(KC_RSFT)) {
804 unregister_code (KC_RSFT);
805 return MACRO(U(RSFT), T(RBRC), T(P), D(RSFT), END);
806 }
807 else
808 return MACRO(T(P), END);
809 break;
810 case CP_TERM:
811 return MACRO(D(RCTRL), D(RSFT), T(V), U(RSFT), U(RCTRL), END);
812 break;
813 case CP_OTHER:
814 return MACRO(D(RCTRL), T(V), U(RCTRL), END);
815 break;
816 }
817 }
818 }
819 break;
820
821 case AE_INS:
822 if (record->event.pressed) {
823 return MACRO(T(I), END);
824 } else {
825 layer_clear();
826 }
827 break;
828
829 case AE_OVR:
830 if (record->event.pressed) {
831 return MACRO(T(R), END);
832 } else {
833 layer_clear();
834 }
835 break;
836
837 case AE_APPND:
838 if (record->event.pressed) {
839 return MACRO(T(A), END);
840 } else {
841 layer_clear();
842 }
843 break;
844
845 /* Plover base */ 736 /* Plover base */
846 case A_PLVR: 737 case A_PLVR:
847 toggle_steno(record->event.pressed); 738 toggle_steno(record->event.pressed);
@@ -872,7 +763,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
872 break; 763 break;
873 764
874 case APP_SLK: 765 case APP_SLK:
875 return MACRODOWN(T(S), T(C), T(U), T(D), T(C), T(L), T(O), T(U), T(D), T(ENT), END); 766 return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END);
876 767
877 case APP_EMCS: 768 case APP_EMCS:
878 return MACRODOWN(T(E), T(M), T(A), T(C), T(S), T(ENT), END); 769 return MACRODOWN(T(E), T(M), T(A), T(C), T(S), T(ENT), END);
@@ -1000,6 +891,21 @@ void matrix_scan_user(void) {
1000 if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) 891 if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
1001 unregister_code (KC_LGUI); 892 unregister_code (KC_LGUI);
1002 893
894 if (ct_cln_timer && timer_elapsed (ct_cln_timer) > TAPPING_TERM) {
895 if (ct_cln_count == 1) {
896 register_code (KC_RSFT);
897 register_code (KC_SCLN);
898 unregister_code (KC_SCLN);
899 unregister_code (KC_RSFT);
900 } else if (ct_cln_count == 2) {
901 register_code (KC_SCLN);
902 unregister_code (KC_SCLN);
903 }
904
905 ct_cln_count = 0;
906 ct_cln_timer = 0;
907 }
908
1003 if (layer != OHLFT) 909 if (layer != OHLFT)
1004 oh_left_blink = 0; 910 oh_left_blink = 0;
1005 if (layer != OHRGT) 911 if (layer != OHRGT)
@@ -1008,7 +914,7 @@ void matrix_scan_user(void) {
1008 if (layer == HUN) { 914 if (layer == HUN) {
1009 ergodox_right_led_2_on(); 915 ergodox_right_led_2_on();
1010 ergodox_right_led_3_on(); 916 ergodox_right_led_3_on();
1011 } else if (layer == EMACS) { 917 } else if (layer == NMDIA) {
1012 ergodox_right_led_1_on(); 918 ergodox_right_led_1_on();
1013 ergodox_right_led_2_on(); 919 ergodox_right_led_2_on();
1014 } else if (layer == PLVR) { 920 } else if (layer == PLVR) {
@@ -1055,7 +961,7 @@ void matrix_scan_user(void) {
1055 ergodox_right_led_1_on (); 961 ergodox_right_led_1_on ();
1056 } else { 962 } else {
1057 ergodox_right_led_1_set (LED_BRIGHTNESS_LO); 963 ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
1058 if (layer != OHLFT && layer != EMACS && layer != PLVR && layer != EXPRM) 964 if (layer != OHLFT && layer != NMDIA && layer != PLVR && layer != EXPRM)
1059 ergodox_right_led_1_off (); 965 ergodox_right_led_1_off ();
1060 } 966 }
1061 967
@@ -1065,7 +971,7 @@ void matrix_scan_user(void) {
1065 ergodox_right_led_2_on (); 971 ergodox_right_led_2_on ();
1066 } else { 972 } else {
1067 ergodox_right_led_2_set (LED_BRIGHTNESS_LO); 973 ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
1068 if (layer != OHRGT && layer != HUN && layer != OHLFT && layer != EMACS && layer != PLVR && layer != EXPRM) 974 if (layer != OHRGT && layer != HUN && layer != OHLFT && layer != NMDIA && layer != PLVR && layer != EXPRM)
1069 ergodox_right_led_2_off (); 975 ergodox_right_led_2_off ();
1070 } 976 }
1071 977
@@ -1087,11 +993,9 @@ void matrix_scan_user(void) {
1087 ang_do_unicode (); 993 ang_do_unicode ();
1088 } 994 }
1089 995
1090#ifdef QMK_VERSION
1091 SEQ_ONE_KEY (KC_V) { 996 SEQ_ONE_KEY (KC_V) {
1092 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); 997 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ (" QMK_VERSION "/" KEYMAP_VERSION ")");
1093 } 998 }
1094#endif
1095 999
1096 SEQ_ONE_KEY (KC_L) { 1000 SEQ_ONE_KEY (KC_L) {
1097 /* λ */ 1001 /* λ */
@@ -1165,8 +1069,36 @@ void matrix_scan_user(void) {
1165 ergodox_right_led_2_off (); 1069 ergodox_right_led_2_off ();
1166 _delay_ms (100); 1070 _delay_ms (100);
1167 ergodox_right_led_3_off (); 1071 ergodox_right_led_3_off ();
1168
1169 } 1072 }
1170 } 1073 }
1171 } 1074 }
1172} 1075}
1076
1077bool process_record_user (uint16_t keycode, keyrecord_t *record) {
1078 switch(keycode) {
1079 case CT_CLN:
1080 if (record->event.pressed) {
1081 ct_cln_count++;
1082 ct_cln_timer = timer_read ();
1083 } else {
1084 }
1085 return false;
1086 break;
1087
1088 default:
1089 if (ct_cln_count == 1) {
1090 register_code (KC_RSFT);
1091 register_code (KC_SCLN);
1092 unregister_code (KC_SCLN);
1093 unregister_code (KC_RSFT);
1094 } else if (ct_cln_count == 2) {
1095 register_code (KC_SCLN);
1096 unregister_code (KC_SCLN);
1097 }
1098 ct_cln_count = 0;
1099 ct_cln_timer = 0;
1100 break;
1101 }
1102
1103 return true;
1104}
diff --git a/keyboards/ergodox_ez/keymaps/algernon/readme.md b/keyboards/ergodox_ez/keymaps/algernon/readme.md
index c66b33f3d..6b7e8fa2e 100644
--- a/keyboards/ergodox_ez/keymaps/algernon/readme.md
+++ b/keyboards/ergodox_ez/keymaps/algernon/readme.md
@@ -10,13 +10,29 @@ history of the layout, see my
10Some of the things in the layout only work when one uses Spacemacs and GNOME 10Some of the things in the layout only work when one uses Spacemacs and GNOME
11under Linux. Your mileage may vary. 11under Linux. Your mileage may vary.
12 12
13## Table of Contents
14
15* [Layouts](#layouts)
16 - [Base layer](#base-layer)
17 - [Experimental layer](#experimental-layer)
18 - [Hungarian layer](#hungarian-layer)
19 - [Navigation and media layer](#navigation-and-media-layer)
20 - [One-handed layer](#one-handed-layer)
21 - [Steno layer](#steno-layer)
22 - [LED states](#led-states)
23* [Building](#building)
24 - [Using on Windows](#using-on-windows)
25* [Changelog](#changelog)
26* [License](#license)
27
28# Layouts
29
13## Base layer 30## Base layer
14 31
15[![Base layer](images/base-layer.png)](http://www.keyboard-layout-editor.com/#/gists/28f7eb305fdbff943613e1dc7aa9e82b) 32[![Base layer](images/base-layer.png)](http://www.keyboard-layout-editor.com/#/gists/28f7eb305fdbff943613e1dc7aa9e82b)
16 33
17At its core, this is a Dvorak layout, with some minor changes (for example, `-` 34At its core, this is a Dvorak layout, with some minor changes. The more
18being on the left half, and on the innermost key of the bottom row on the 35interesting parts are how certain keys behave:
19right). The more interesting parts are how certain keys behave:
20 36
21* The keys on the number row double as function keys, when held for a bit longer 37* The keys on the number row double as function keys, when held for a bit longer
22 than an usual tap. This allows me to use the function keys without having to 38 than an usual tap. This allows me to use the function keys without having to
@@ -33,9 +49,13 @@ right). The more interesting parts are how certain keys behave:
33 normal layout. 49 normal layout.
34* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of 50* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of
35 the one-shot modifiers are in-flight (as in, single-tapped, and not expired 51 the one-shot modifiers are in-flight (as in, single-tapped, and not expired
36 yet), it cancels all one-shot modifiers. Otherwise it sends the usual keycode. 52 yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if
37* The **Emacs** and **Hun** layer keys are one-shot, the **1Hand** and **STENO** 53 active. Otherwise it sends the usual keycode.
38 keys are toggles. 54* The **Media**, **Arrow**, and **Hun** layer keys are one-shot, the **1Hand**
55 and **STENO** keys are toggles.
56* Toggling the **Arrow** layer toggles between the cursor arrows and the paging
57 keys on the bottom row.
58* Tapping the `:` key once yields `:`, tapping it twice yields `;`.
39* The **Lead** key allows me to type in a sequence of keys, and trigger some 59* The **Lead** key allows me to type in a sequence of keys, and trigger some
40 actions: 60 actions:
41 - `LEAD u` enters unicode input mode, by sending the GTK+ key sequence that 61 - `LEAD u` enters unicode input mode, by sending the GTK+ key sequence that
@@ -45,8 +65,19 @@ right). The more interesting parts are how certain keys behave:
45 - `LEAD y` types `\o/`. 65 - `LEAD y` types `\o/`.
46 - `LEAD w m` maximises the currently focused window. 66 - `LEAD w m` maximises the currently focused window.
47 - `LEAD e` makes the [experimental layer](#experimental-layer) the default. 67 - `LEAD e` makes the [experimental layer](#experimental-layer) the default.
48 - `LEAD v` prints the firmware version, the keyboard and the keymap, if 68 - `LEAD v` prints the firmware version, the keyboard and the keymap.
49 compiled with a QMK version that has these available. 69
70## Experimental layer
71
72[![Experimental layer](images/experimental-layer.png)](http://www.keyboard-layout-editor.com/#/gists/6ff50bf71248e05aab5b3fec4fae3d08)
73
74While using the standard Dvorak layout, I encountered a number of
75inconveniences, and on this layer, I am playing with ideas to make the layout
76feel better. Initially, it was based on [Capewell-Dvorak][cpd], but that too,
77had shortcomings I was not happy with. So now this is something inbetween, with
78own observations thrown in. How it works out in the long run remains to be seen.
79
80 [cpd]: http://www.michaelcapewell.com/projects/keyboard/layout_capewell-dvorak.htm
50 81
51## Hungarian layer 82## Hungarian layer
52 83
@@ -57,32 +88,12 @@ variant. For some, which can have other diatribes, the long one is on top,
57short's on bottom. Tapping any of the accented characters takes us back to the 88short's on bottom. Tapping any of the accented characters takes us back to the
58base layer. 89base layer.
59 90
60## Emacs layer 91## Navigation and media layer
61 92
62[![Emacs layer](images/emacs-layer.png)](http://www.keyboard-layout-editor.com/#/gists/c59c453f9fe1a3238ba1494e7e5c6892) 93[![Navigation and media layer](images/nav-n-media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/c59c453f9fe1a3238ba1494e7e5c6892)
63 94
64This layer is primarily for navigating text - and for some mousing and other 95This layer is primarily for navigating with the cursor or the mouse, and some
65things, because there was space. Most of the keys should be pretty 96media things.
66self-explanatory, except for a few:
67
68* There are three keys on the bottom row of the left side, that change how some
69 of the other keys - explained just below - work. The keys are for *Emacs
70 mode* (the default), *Terminal mode*, and *Traditional mode*, respectively.
71* The *Visual mode* key (the top big key on the left side) sends the `v` key in
72 *Emacs mode*, to enter Visual mode in Spacemacs. In all other modes, it is a
73 no-op.
74* The *Copy/Cut* key (the bottom big key on the left side) sends the copy
75 command on tap, the cut one when held for longer than a normal tap. The **copy
76 command** is `y` in *Emacs mode*, `Ctrl-Shift-c` in *Terminal mode*, and
77 `Ctrl-c` in *Traditional mode*. The **cut command** is `x` in *Emacs mode*,
78 `Ctrl-Shift-x` in *Terminal Mode* and `Ctrl-x` in *Traditional mode*.
79* The *Paste/Delete* key (the leftmost key on the left thumb cluster) sends the
80 paste command on tap, the delete one when held longer than a normal tap. The
81 **paste command** is `p` in *Emacs mode*, `Ctrl-Shift-v` in *Terminal mode*,
82 and `Ctrl-v` in *Traditional mode*. The **delete command** is `d` in *Emacs
83 mode*, and `DEL` in the other two.
84* The `A`, `I` and `R` keys will - after sending themselves - clear the layer
85 back to the base layer. This allows a quick escape from the layer.
86 97
87## One-handed layer 98## One-handed layer
88 99
@@ -113,33 +124,50 @@ This is to be used with [Plover](http://www.openstenoproject.org/plover/),
113nothing really fancy here. The **STENO** key toggles the layer on and off, and 124nothing really fancy here. The **STENO** key toggles the layer on and off, and
114sends the toggle command to Plover too. 125sends the toggle command to Plover too.
115 126
116## Experimental layer 127## LED states
117 128
118[![Experimental layer](images/experimental-layer.png)](http://www.keyboard-layout-editor.com/#/gists/6ff50bf71248e05aab5b3fec4fae3d08) 129The primary purpose of the LEDs is to show the modifier status, a secondary, to
119 130show which layer is active. Each modifier, `Shift`, `Alt` and `Control` each
120While using the standard Dvorak layout, I encountered a number of 131have their designated LEDs: the *red*, *green* and *blue*, respectively. When a
121inconveniences, and on this layer, I am playing with ideas to make the layout 132modifier is in a one-shot state, the respective LED will turn on with a dimmer
122feel better. Initially, it was based on [Capewell-Dvorak][cpd], but that too, 133light. If the modifier is toggled on, the brightness of the LED turns full.
123had shortcomings I was not happy with. So now this is something inbetween, with 134
124own observations thrown in. How it works out in the long run remains to be seen. 135For the layers, the following rules apply:
125 136
126 [cpd]: http://www.michaelcapewell.com/projects/keyboard/layout_capewell-dvorak.htm 137* When the [Experimental layer](#experimental-layer) is toggled on, LEDs will
138 light up from left to right in a sequence, then turn off. When the layer is
139 toggled off, the LEDs light up and turn off in the other direction. No LEDs
140 are on while the layer is active.
141* When the [Hungarian layer](#hungarian-layer) is active, the *green* and *blue*
142 LEDs are on.
143* When the [Navigation and media layer](#navigation-and-media-layer) is active,
144 the *red* and *green* ones are on.
145* When the [One-handed layer](#one-handed-layer) is active, the *green* LED is
146 on and bright, and either the *red* or the *blue* one is going to slowly
147 blink, depending on the currently active side.
148* For the [Steno layer](#steno-layer), all LEDs will be turned on.
149
150Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers
151use a stronger one, and modifiers override any layer preferences. For example,
152when on the one-handed layer, with the left side active (*red* light blinking),
153if `Shift` is on, the *red* light will be constantly on.
127 154
128# Building 155# Building
129 156
130To make my workflow easier, this layout is maintained in 157To make my workflow easier, this layout is maintained in
131[its own repository][algernon:ez-layout]. To build it, you will need the 158[its own repository][algernon:ez-layout]. To build it, you will need the
132[QMK][qmk] firmware checked out, and this repo either checked out, or symlinked 159[QMK][qmk] firmware checked out, and this repo either checked out to something
133to `keyboards/ergodox_ez/algernon`. One way to achieve that is this: 160like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this:
134 161
135 [algernon:ez-layout]: https://github.com/algernon/ergodox-layout 162 [algernon:ez-layout]: https://github.com/algernon/ergodox-layout
136 [qmk]: https://github.com/jackhumbert/qmk_firmware 163 [qmk]: https://github.com/jackhumbert/qmk_firmware
137 164
138``` 165```
139$ git clone https://github.com/jackhumbert/qmk_firmware.git 166$ git clone https://github.com/jackhumbert/qmk_firmware.git
140$ cd qmk_firmware/keyboards/ergodox_ez 167$ cd qmk_firmware
141$ git clone https://github.com/algernon/ergodox-layout.git keymaps/algernon 168$ git clone https://github.com/algernon/ergodox-layout.git \
142$ make KEYMAP=algernon 169 keyboards/ergodox_ez/keymaps/algernon-master
170$ make KEYBOARD=ergodox_ez KEYMAP=algernon-master
143``` 171```
144 172
145From time to time, updates may be submitted back to the QMK repository. If you 173From time to time, updates may be submitted back to the QMK repository. If you
@@ -147,10 +175,54 @@ are reading it there, you can build the firmware like any other firmware
147included with it (assuming you are in the root directory of the firmware): 175included with it (assuming you are in the root directory of the firmware):
148 176
149``` 177```
150$ cd keyboards/ergodox_ez 178$ make KEYBOARD=ergodox_ez KEYMAP=algernon
151$ make KEYMAP=algernon
152``` 179```
153 180
181## Using on Windows
182
183The keymap default to forcing NKRO, which seems to upset Windows, and except the
184modifiers, none of them work. If you experience this problem, recompile the
185firmware with `FORCE_NKRO=no` added to the `make` command line.
186
187# Changelog
188
189## v1.2 - 2016-06-22
190
191* The forced NKRO mode can be easily toggled off at compile-time, to make the
192 firmware compatible with [certain operating systems](#using-on-windows).
193* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to
194 be double-tapped, instead of shifted.
195* The `=` and `\` keys were swapped, `=` moved to the home row, on both the
196 [base](#base-layer) and the [experimental](#experimental-layer) layers.
197* The arrow and navigation keys were redone, they are now more accessible, but
198 the navigation keys require an extra tap to access.
199* The **Emacs** layer is gone, replaced by a simplified
200 [navigation and media](#navigation-and-media-layer) layer.
201* `LEAD v` types the firmware version, and the keymap version.
202* On the [experimental](#experimental-layer) layer, the `L` and `Q`, and the `K`
203 and `G` keys were swapped.
204* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it
205 easier on my fingers.
206
207## v1.1 - 2016-06-14
208
209* The keyboard starts in NKRO mode, bootmagic and other things are disabled.
210* A [Steno](#steno-layer) layer was added, to be used with Plover.
211* An [experimental](#experimental-layer) layer was added, something halfway
212 between Dvorak and Capewell-Dvorak. A work in progress.
213* `LEAD y` types `\o/`.
214* Some keys on the [Base](#base-layer) layer have been moved around:
215 - `?` moved to the left pinky, left of `Q`.
216 - `=` shifted one row down, but `F11` stayed where it was.
217 - `-` on the left half was replaced by `Tab`.
218 - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key.
219 - `:` now inputs `;` when shifted.
220* `ESC` cancels the [Hungarian](#hungarian-layer) layer too, not just modifiers.
221
222## v1.0 - 2016-05-26
223
224Initial version.
225
154# License 226# License
155 227
156The layout, being a derivative of the original TMK firmware which is under the 228The layout, being a derivative of the original TMK firmware which is under the