aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/ergodox/ez/rules.mk2
-rw-r--r--keyboards/ergodox/keymaps/algernon/Makefile4
-rw-r--r--keyboards/ergodox/keymaps/algernon/images/adore-layer.pngbin93893 -> 97225 bytes
-rw-r--r--keyboards/ergodox/keymaps/algernon/images/base-layer.pngbin95204 -> 102142 bytes
-rw-r--r--keyboards/ergodox/keymaps/algernon/images/heatmap.pngbin137912 -> 139351 bytes
-rw-r--r--keyboards/ergodox/keymaps/algernon/keymap.c381
-rw-r--r--keyboards/ergodox/keymaps/algernon/readme.md76
-rw-r--r--keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json132
-rw-r--r--keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json129
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/hid-commands61
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/layer-notify12
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py184
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/max-focused5
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/text-to-log.py107
-rw-r--r--keyboards/ergodox/keymaps/default/keymap.c12
-rw-r--r--keyboards/ergodox/keymaps/default/readme.md2
-rw-r--r--keyboards/kc60/config.h2
-rw-r--r--keyboards/lets_split/config.h7
-rw-r--r--keyboards/lets_split/i2c.c3
-rw-r--r--keyboards/lets_split/keymaps/i2c/config.h102
-rw-r--r--keyboards/lets_split/keymaps/i2c/keymap.c214
-rw-r--r--keyboards/lets_split/keymaps/serial/config.h102
-rw-r--r--keyboards/lets_split/keymaps/serial/keymap.c214
-rw-r--r--keyboards/lets_split/matrix.c23
-rw-r--r--keyboards/lets_split/rules.mk4
-rw-r--r--keyboards/lets_split/serial.c5
-rw-r--r--keyboards/lets_split/split_util.c8
-rw-r--r--keyboards/planck/keymaps/impossible/Makefile25
-rw-r--r--keyboards/planck/keymaps/impossible/keymap.c242
-rw-r--r--keyboards/planck/keymaps/impossible/readme.md73
-rw-r--r--keyboards/tada68/Makefile3
-rw-r--r--keyboards/tada68/config.h97
-rw-r--r--keyboards/tada68/keymaps/default/Makefile21
-rw-r--r--keyboards/tada68/keymaps/default/keymap.c98
-rw-r--r--keyboards/tada68/keymaps/default/readme.md1
-rw-r--r--keyboards/tada68/readme.md4
-rw-r--r--keyboards/tada68/rules.mk66
-rw-r--r--keyboards/tada68/tada68.c30
-rw-r--r--keyboards/tada68/tada68.h43
-rw-r--r--quantum/process_keycode/process_tap_dance.c1
-rw-r--r--quantum/process_keycode/process_tap_dance.h10
-rw-r--r--readme.md2
-rw-r--r--tmk_core/common/action.c7
43 files changed, 2014 insertions, 500 deletions
diff --git a/keyboards/ergodox/ez/rules.mk b/keyboards/ergodox/ez/rules.mk
index 37e554b30..a9715beb8 100644
--- a/keyboards/ergodox/ez/rules.mk
+++ b/keyboards/ergodox/ez/rules.mk
@@ -71,6 +71,8 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512
71# comment out to disable the options. 71# comment out to disable the options.
72# 72#
73 73
74SLEEP_LED_ENABLE = no
75
74ifndef QUANTUM_DIR 76ifndef QUANTUM_DIR
75 include ../../../Makefile 77 include ../../../Makefile
76endif 78endif
diff --git a/keyboards/ergodox/keymaps/algernon/Makefile b/keyboards/ergodox/keymaps/algernon/Makefile
index 7c2b3ad97..699add3dd 100644
--- a/keyboards/ergodox/keymaps/algernon/Makefile
+++ b/keyboards/ergodox/keymaps/algernon/Makefile
@@ -7,7 +7,7 @@ CONSOLE_ENABLE = no
7TAP_DANCE_ENABLE = yes 7TAP_DANCE_ENABLE = yes
8KEYLOGGER_ENABLE ?= yes 8KEYLOGGER_ENABLE ?= yes
9UCIS_ENABLE = yes 9UCIS_ENABLE = yes
10MOUSEKEY_ENABLE ?= yes 10MOUSEKEY_ENABLE = no
11 11
12AUTOLOG_ENABLE ?= no 12AUTOLOG_ENABLE ?= no
13 13
@@ -25,6 +25,8 @@ OPT_DEFS += -DKEYLOGGER_ENABLE
25CONSOLE_ENABLE = yes 25CONSOLE_ENABLE = yes
26endif 26endif
27 27
28OPT_DEFS += -DUSER_PRINT
29
28KEYMAP_VERSION = $(shell \ 30KEYMAP_VERSION = $(shell \
29 if [ -d "${KEYMAP_PATH}/.git" ]; then \ 31 if [ -d "${KEYMAP_PATH}/.git" ]; then \
30 cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \ 32 cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \
diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png
index 3d0a5fb20..b611fbc42 100644
--- a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png
+++ b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/algernon/images/base-layer.png b/keyboards/ergodox/keymaps/algernon/images/base-layer.png
index 7ea57aae3..2a981a470 100644
--- a/keyboards/ergodox/keymaps/algernon/images/base-layer.png
+++ b/keyboards/ergodox/keymaps/algernon/images/base-layer.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/algernon/images/heatmap.png b/keyboards/ergodox/keymaps/algernon/images/heatmap.png
index 356035e0a..4f55c5adf 100644
--- a/keyboards/ergodox/keymaps/algernon/images/heatmap.png
+++ b/keyboards/ergodox/keymaps/algernon/images/heatmap.png
Binary files differ
diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c
index 9f476d8a6..248a0ed30 100644
--- a/keyboards/ergodox/keymaps/algernon/keymap.c
+++ b/keyboards/ergodox/keymaps/algernon/keymap.c
@@ -8,7 +8,6 @@
8#include "debug.h" 8#include "debug.h"
9#include "action_layer.h" 9#include "action_layer.h"
10#include "action_util.h" 10#include "action_util.h"
11#include "mousekey.h"
12#include "timer.h" 11#include "timer.h"
13#include "keymap_plover.h" 12#include "keymap_plover.h"
14#include "eeconfig.h" 13#include "eeconfig.h"
@@ -36,18 +35,6 @@ enum {
36 A_PLVR, 35 A_PLVR,
37 A_MPN, 36 A_MPN,
38 37
39 // Function / number keys
40 KF_1, // 1, F1
41 KF_2, // 2, F2
42 KF_3, // ...
43 KF_4,
44 KF_5,
45 KF_6,
46 KF_7,
47 KF_8,
48 KF_9,
49 KF_10,
50
51 // Application select keys 38 // Application select keys
52 APP_SLK, // Slack 39 APP_SLK, // Slack
53 APP_EMCS, // Emacs 40 APP_EMCS, // Emacs
@@ -55,17 +42,6 @@ enum {
55 APP_CHRM, // Chrome 42 APP_CHRM, // Chrome
56 APP_MSIC, // Music 43 APP_MSIC, // Music
57 44
58 // Diagonal mouse movement
59 A_MUL,
60 A_MUR,
61 A_MDL,
62 A_MDR,
63
64 // Mouse acceleration
65 A_ACL0,
66 A_ACL1,
67 A_ACL2,
68
69 // Hungarian layer keys 45 // Hungarian layer keys
70 HU_AA, // Á 46 HU_AA, // Á
71 HU_OO, // Ó 47 HU_OO, // Ó
@@ -76,6 +52,18 @@ enum {
76 HU_UE, // Ü 52 HU_UE, // Ü
77 HU_OEE, // Ő 53 HU_OEE, // Ő
78 HU_UEE, // Ű 54 HU_UEE, // Ű
55
56 // number/symbol keys
57 A_1, // 1
58 A_2, // 2
59 A_3, // ...
60 A_4,
61 A_5,
62 A_6,
63 A_7,
64 A_8,
65 A_9,
66 A_0,
79}; 67};
80 68
81/* Fn keys */ 69/* Fn keys */
@@ -95,7 +83,9 @@ enum {
95 CT_CLN = 0, 83 CT_CLN = 0,
96 CT_TA, 84 CT_TA,
97 CT_LBP, 85 CT_LBP,
98 CT_RBP 86 CT_RBP,
87 CT_TMUX,
88 CT_TPS,
99}; 89};
100 90
101/* States & timers */ 91/* States & timers */
@@ -114,6 +104,8 @@ bool log_enable = false;
114 104
115bool time_travel = false; 105bool time_travel = false;
116 106
107static uint8_t is_adore = 0;
108
117/* The Keymap */ 109/* The Keymap */
118 110
119const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 111const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -121,13 +113,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
121/* Keymap 0: Base Layer 113/* Keymap 0: Base Layer
122 * 114 *
123 * ,-----------------------------------------------------. ,-----------------------------------------------------. 115 * ,-----------------------------------------------------. ,-----------------------------------------------------.
124 * | Next/Prev | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | 116 * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
125 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 117 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
126 * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ | 118 * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ |
127 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| 119 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
128 * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | 120 * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow |
129 * |-----------+------+------+------+------+------| : | | - |------+------+------+------+------+-----------| 121 * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------|
130 * | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop | 122 * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop |
131 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' 123 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
132 * | | | | | : | | - | | | | | 124 * | | | | | : | | - | | | | |
133 * `-----------------------------------' `-----------------------------------' 125 * `-----------------------------------' `-----------------------------------'
@@ -141,22 +133,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
141 */ 133 */
142[BASE] = KEYMAP( 134[BASE] = KEYMAP(
143// left hand 135// left hand
144 M(A_MPN) ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) 136 M(A_MPN) ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11
145,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP) 137,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP)
146,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I 138,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I
147,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_CLN) 139,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_TMUX)
148,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) 140,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN)
149 141
150 ,F(F_ALT),F(F_GUI) 142 ,F(F_ALT),F(F_GUI)
151 ,F(F_CTRL) 143 ,F(F_CTRL)
152 ,KC_BSPC,F(F_SFT),KC_ESC 144 ,KC_BSPC,F(F_SFT),KC_ESC
153 145
154 // right hand 146 // right hand
155 ,KC_F12 ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 147 ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
156 ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS 148 ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS
157 ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL 149 ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL
158 ,KC_MINS ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP 150 ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP
159 ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO 151 ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
160 152
161 ,OSL(NMDIA),KC_DEL 153 ,OSL(NMDIA),KC_DEL
162 ,KC_LEAD 154 ,KC_LEAD
@@ -166,15 +158,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
166/* Keymap 1: Adore layer 158/* Keymap 1: Adore layer
167 * 159 *
168 * ,-----------------------------------------------------. ,-----------------------------------------------------. 160 * ,-----------------------------------------------------. ,-----------------------------------------------------.
169 * | Play/Pause| 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | 161 * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
170 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 162 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
171 * | `~ | Y | W | G | L | M | ( | | ) | F | H | C | P | X | \ | 163 * | `~ | X | W | G | L | M | ( | | ) | F | H | C | P | Y | \ |
172 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| 164 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
173 * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | 165 * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = |
174 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| 166 * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------|
175 * | | Z | Q | ' | , | . | : | | - | B | K | V | J | / | | 167 * | | Z | Q | ' | , | . | | | pane | B | K | V | J | / | |
176 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' 168 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
177 * | | | | | | | | | | | | 169 * | | | | | : | | - | | | | |
178 * `-----------------------------------' `-----------------------------------' 170 * `-----------------------------------' `-----------------------------------'
179 * ,-------------. ,-------------. 171 * ,-------------. ,-------------.
180 * | LAlt | GUI | | MDIA | Del | 172 * | LAlt | GUI | | MDIA | Del |
@@ -186,22 +178,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
186 */ 178 */
187[ADORE] = KEYMAP( 179[ADORE] = KEYMAP(
188// left hand 180// left hand
189 KC_MPLY ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) 181 KC_MPLY ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11
190,KC_GRV ,KC_Y ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP) 182,KC_GRV ,KC_X ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP)
191,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U 183,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U
192,KC_NO ,KC_Z ,KC_Q ,KC_QUOT,KC_COMM,KC_DOT ,TD(CT_CLN) 184,KC_NO ,KC_Z ,KC_Q ,KC_QUOT ,KC_COMM ,KC_DOT ,TD(CT_TMUX)
193,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 185,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN)
194 186
195 ,F(F_ALT),F(F_GUI) 187 ,F(F_ALT),F(F_GUI)
196 ,F(F_CTRL) 188 ,F(F_CTRL)
197 ,KC_BSPC,F(F_SFT),KC_ESC 189 ,KC_BSPC,F(F_SFT),KC_ESC
198 190
199 // right hand 191 // right hand
200 ,KC_F12 ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 192 ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
201 ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_X ,KC_BSLS 193 ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS
202 ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL 194 ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL
203 ,KC_MINS ,KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO 195 ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO
204 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 196 ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
205 197
206 ,OSL(NMDIA),KC_DEL 198 ,OSL(NMDIA),KC_DEL
207 ,F(F_HUN) 199 ,F(F_HUN)
@@ -350,45 +342,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
350/* Keymap 5: Navigation & Media layer 342/* Keymap 5: Navigation & Media layer
351 * 343 *
352 * ,-----------------------------------------------------. ,-----------------------------------------------------. 344 * ,-----------------------------------------------------. ,-----------------------------------------------------.
353 * | MS Slow | | | | | |ScrLCK| |ScrLCK| | | | | | | 345 * | | F9 | F7 | F5 | F3 | F1 | | |ScrLCK| F10 | F2 | F4 | F6 | F8 | |
354 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 346 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
355 * | MS Normal | | Home | Up | PgUp | | | |Scroll| |MsUpL | MsUp |MsUpR | |PrintScreen| 347 * | | | | | | | | | | | | | | | |
356 * |-----------+------+------+------+------+------| | | Up |------+------+------+------+------+-----------| 348 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
357 * | MS Fast | | Left | Down | Right| |------| |------| |MsLeft| MsDn |MsRght| | | 349 * | | | | | | |------| |------| | | | | | |
358 * |-----------+------+------+------+------+------| | |Scroll|------+------+------+------+------+-----------| 350 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
359 * | Play/Pause| | End | Down | PgDn | | | | Down | |MsDnL | MsDn |MsDnR | | Stop | 351 * | | | | | | | | | | | | | | | |
360 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' 352 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
361 * | | | | | | | | | | | | 353 * | | | | | | | | | | | |
362 * `----------------------------------' `----------------------------------' 354 * `----------------------------------' `----------------------------------'
363 * ,-------------. ,-------------. 355 * ,-------------. ,-------------.
364 * | Mute | VlUp | | BASE | MClk | 356 * | Mute | VlUp | | BASE | |
365 * ,------|------|------| |------+------+------. 357 * ,------|------|------| |------+------+------.
366 * | | | VlDn | | Prev |Left |Right | 358 * | | | VlDn | | | | |
367 * | SPC | Enter|------| |------| Click| Click| 359 * | | |------| |------| | |
368 * | | | ESC | | Next | | | 360 * | | | | | | | |
369 * `--------------------' `--------------------' 361 * `--------------------' `--------------------'
370 */ 362 */
371[NMDIA] = KEYMAP( 363[NMDIA] = KEYMAP(
372// left hand 364// left hand
373 M(A_ACL0) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L) 365 KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,KC_NO
374,M(A_ACL1) ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO 366,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
375,M(A_ACL2) ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO 367,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
376,KC_MPLY ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_NO 368,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
377,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 369,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
378 ,KC_MUTE ,KC_VOLU 370 ,KC_MUTE ,KC_VOLU
379 ,KC_VOLD 371 ,KC_VOLD
380 ,KC_SPC,KC_ENTER,KC_ESC 372 ,KC_NO ,KC_NO ,KC_TRNS
381 373
382 // right hand 374 // right hand
383 ,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 375 ,LGUI(KC_L),KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO
384 ,KC_WH_U ,KC_NO ,M(A_MUL),KC_MS_U ,M(A_MUR),KC_NO ,KC_PSCR 376 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
385 ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO 377 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
386 ,KC_WH_D ,KC_NO ,M(A_MDL),KC_MS_D ,M(A_MDR),KC_NO ,KC_MSTP 378 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
387 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 379 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
388 380
389 ,KC_TRNS ,KC_MS_BTN3 381 ,KC_TRNS ,KC_NO
390 ,KC_MPRV 382 ,KC_NO
391 ,KC_MNXT ,KC_BTN1 ,KC_BTN2 383 ,KC_NO ,KC_NO ,KC_NO
392 ), 384 ),
393 385
394/* Keymap 6: Steno for Plover 386/* Keymap 6: Steno for Plover
@@ -514,40 +506,62 @@ static macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_c
514 return MACRO_NONE; 506 return MACRO_NONE;
515} 507}
516 508
517static bool from_appsel; 509static void ang_handle_num_row(uint8_t id, keyrecord_t *record) {
510 uint8_t idx = id - A_1;
511 uint8_t kc;
512 static bool shifted[10];
518 513
519static void ang_handle_kf (keyrecord_t *record, uint8_t id) 514 if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
520{ 515 ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
521 uint8_t code = id - KF_1; 516 if (record->event.pressed)
517 shifted[idx] = true;
518 }
522 519
523 if (record->event.pressed) { 520 if (!shifted[idx]) {
524 kf_timers[code] = timer_read (); 521 kc = idx + KC_1;
525 } else { 522 } else {
526 uint8_t kc_base; 523 switch (id) {
527 524 case A_8:
528 if (from_appsel) { 525 case A_9:
529 from_appsel = false; 526 shifted[idx] = false;
530 return; 527 return;
531 }
532 528
533 if (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM) { 529 case A_7:
534 // Long press 530 kc = KC_2;
535 kc_base = KC_F1; 531 break;
536 } else { 532 case A_5:
537 kc_base = KC_1; 533 kc = KC_8;
534 break;
535 case A_3:
536 kc = KC_6;
537 break;
538 case A_1:
539 kc = KC_4;
540 break;
541
542 case A_0:
543 kc = KC_5;
544 break;
545 case A_2:
546 kc = KC_1;
547 break;
548 case A_4:
549 kc = KC_3;
550 break;
551 case A_6:
552 kc = KC_7;
553 break;
538 } 554 }
539 kf_timers[code] = 0; 555 }
540 code += kc_base;
541 556
542 register_code (code); 557 if (record->event.pressed) {
543 unregister_code (code); 558 register_code (kc);
559 } else {
560 unregister_code (kc);
561 shifted[idx] = false;
544 } 562 }
545} 563}
546 564
547static struct {
548 uint8_t idx;
549} m_accel_state;
550
551const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) 565const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
552{ 566{
553 switch(id) { 567 switch(id) {
@@ -592,70 +606,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
592 case HU_UEE: 606 case HU_UEE:
593 return ang_do_hun (record, KC_EQL, KC_U); 607 return ang_do_hun (record, KC_EQL, KC_U);
594 608
595#if MOUSEKEY_ENABLE
596 /* Mouse movement */
597 case A_MUL:
598 if (record->event.pressed) {
599 mousekey_on(KC_MS_UP);
600 mousekey_on(KC_MS_LEFT);
601 } else {
602 mousekey_off(KC_MS_UP);
603 mousekey_off(KC_MS_LEFT);
604 }
605 mousekey_send();
606 break;
607
608 case A_MUR:
609 if (record->event.pressed) {
610 mousekey_on(KC_MS_UP);
611 mousekey_on(KC_MS_RIGHT);
612 } else {
613 mousekey_off(KC_MS_UP);
614 mousekey_off(KC_MS_RIGHT);
615 }
616 mousekey_send();
617 break;
618
619 case A_MDL:
620 if (record->event.pressed) {
621 mousekey_on(KC_MS_DOWN);
622 mousekey_on(KC_MS_LEFT);
623 } else {
624 mousekey_off(KC_MS_DOWN);
625 mousekey_off(KC_MS_LEFT);
626 }
627 mousekey_send();
628 break;
629
630 case A_MDR:
631 if (record->event.pressed) {
632 mousekey_on(KC_MS_DOWN);
633 mousekey_on(KC_MS_RIGHT);
634 } else {
635 mousekey_off(KC_MS_DOWN);
636 mousekey_off(KC_MS_RIGHT);
637 }
638 mousekey_send();
639 break;
640
641 case A_ACL0 ... A_ACL2:
642 if (record->event.pressed) {
643 uint8_t idx = id - A_ACL0;
644 if (m_accel_state.idx == id) {
645 mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0);
646 m_accel_state.idx = 0;
647 } else {
648 if (m_accel_state.idx) {
649 mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0);
650 m_accel_state.idx = 0;
651 }
652 mousekey_on(KC_ACL0 + idx);
653 m_accel_state.idx = id;
654 }
655 }
656 break;
657#endif
658
659 /* Plover base */ 609 /* Plover base */
660 case A_PLVR: 610 case A_PLVR:
661 toggle_steno(record->event.pressed); 611 toggle_steno(record->event.pressed);
@@ -667,7 +617,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
667 register_code (KC_LGUI); 617 register_code (KC_LGUI);
668 if (record->tap.count && !record->tap.interrupted) { 618 if (record->tap.count && !record->tap.interrupted) {
669 if (record->tap.count >= 2) { 619 if (record->tap.count >= 2) {
670 register_code (KC_W);
671 layer_on (APPSEL); 620 layer_on (APPSEL);
672 set_oneshot_layer (APPSEL, ONESHOT_START); 621 set_oneshot_layer (APPSEL, ONESHOT_START);
673 } 622 }
@@ -678,7 +627,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
678 } else { 627 } else {
679 if (record->tap.count >= 2) 628 if (record->tap.count >= 2)
680 { 629 {
681 unregister_code (KC_W);
682 clear_oneshot_layer_state (ONESHOT_PRESSED); 630 clear_oneshot_layer_state (ONESHOT_PRESSED);
683 } 631 }
684 gui_timer = timer_read (); 632 gui_timer = timer_read ();
@@ -686,43 +634,39 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
686 break; 634 break;
687 635
688 case APP_SLK: 636 case APP_SLK:
689 from_appsel = true; 637 if (record->event.pressed)
690 return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END); 638 uprintf("CMD:appsel_slack\n");
639 break;
691 640
692 case APP_EMCS: 641 case APP_EMCS:
693 from_appsel = true; 642 if (record->event.pressed)
694 return MACRODOWN(T(G), T(N), T(U), T(SPC), T(E), T(M), T(A), T(C), T(S), T(SPC), T(2), T(4), T(ENT), END); 643 uprintf("CMD:appsel_emacs\n");
644 break;
695 645
696 case APP_TERM: 646 case APP_TERM:
697 from_appsel = true; 647 if (record->event.pressed)
698 if (!record->event.pressed) { 648 uprintf("CMD:appsel_term\n");
699 register_code(KC_ESC);
700 unregister_code(KC_ESC);
701 wait_ms(TAPPING_TERM + 25);
702 register_code(KC_DEL);
703 unregister_code(KC_DEL);
704 }
705 break; 649 break;
706 650
707 case APP_CHRM: 651 case APP_CHRM:
708 from_appsel = true; 652 if (record->event.pressed)
709 return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END); 653 uprintf("CMD:appsel_chrome\n");
654 break;
710 655
711 case APP_MSIC: 656 case APP_MSIC:
712 from_appsel = true; 657 if (record->event.pressed)
713 return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END); 658 uprintf("CMD:appsel_music\n");
659 break;
714 660
715 /* Function keys */ 661 // number row and symbols
716 case KF_1 ... KF_10: 662 case A_1 ... A_0:
717 ang_handle_kf (record, id); 663 ang_handle_num_row(id, record);
718 break; 664 break;
719 } 665 }
720 666
721 return MACRO_NONE; 667 return MACRO_NONE;
722}; 668};
723 669
724static uint8_t is_adore = 0;
725
726// Runs just one time when the keyboard initializes. 670// Runs just one time when the keyboard initializes.
727void matrix_init_user(void) { 671void matrix_init_user(void) {
728 uint8_t dl; 672 uint8_t dl;
@@ -805,6 +749,36 @@ static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data
805 layer_off (ARRW); 749 layer_off (ARRW);
806} 750}
807 751
752static void ang_tap_dance_tmux_finished (qk_tap_dance_state_t *state, void *user_data) {
753 if (state->count == 1) {
754 register_code(KC_LALT);
755 register_code(KC_SPC);
756 unregister_code(KC_SPC);
757 unregister_code(KC_LALT);
758 } else {
759 register_code(KC_LCTL);
760 register_code(KC_A);
761 unregister_code(KC_A);
762 unregister_code(KC_LCTL);
763 }
764}
765
766static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *user_data) {
767 uint8_t kc = KC_P;
768
769 if (state->count >= 2) {
770 kc = KC_Z;
771 }
772
773 register_code(KC_LALT);
774 register_code(KC_SPC);
775 unregister_code(KC_SPC);
776 unregister_code(KC_LALT);
777
778 register_code(kc);
779 unregister_code(kc);
780}
781
808qk_tap_dance_action_t tap_dance_actions[] = { 782qk_tap_dance_action_t tap_dance_actions[] = {
809 [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN) 783 [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN)
810 ,[CT_TA] = { 784 ,[CT_TA] = {
@@ -813,12 +787,23 @@ qk_tap_dance_action_t tap_dance_actions[] = {
813 } 787 }
814 ,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN) 788 ,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN)
815 ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN) 789 ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN)
790 ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished)
791 ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select)
816}; 792};
817 793
818// Runs constantly in the background, in a loop. 794// Runs constantly in the background, in a loop.
819void matrix_scan_user(void) { 795void matrix_scan_user(void) {
796 static uint32_t prev_layer_state;
820 uint8_t layer = biton32(layer_state); 797 uint8_t layer = biton32(layer_state);
821 bool is_arrow = false; 798 bool is_arrow = false;
799 static char *layer_lookup[] = {"Dvorak", "ADORE", "Arrows", "AppSel", "Hungarian", "Nav/Media", "Plover"};
800
801 if (layer_state != prev_layer_state) {
802 prev_layer_state = layer_state;
803 if (layer_lookup[layer])
804 uprintf("LAYER: %s\n", layer_lookup[layer]);
805 }
806
822 807
823 if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) 808 if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
824 unregister_code (KC_LGUI); 809 unregister_code (KC_LGUI);
@@ -929,18 +914,7 @@ void matrix_scan_user(void) {
929 } 914 }
930 915
931 SEQ_TWO_KEYS (KC_W, KC_M) { 916 SEQ_TWO_KEYS (KC_W, KC_M) {
932 register_code (KC_LALT); 917 uprintf("CMD:wm\n");
933 register_code (KC_F2);
934 unregister_code (KC_F2);
935 unregister_code (KC_LALT);
936
937 wait_ms (1000);
938
939 ang_tap (KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0);
940 register_code (KC_LGUI);
941 register_code (KC_UP);
942 unregister_code (KC_UP);
943 unregister_code (KC_LGUI);
944 } 918 }
945 919
946 SEQ_ONE_KEY (KC_A) { 920 SEQ_ONE_KEY (KC_A) {
@@ -999,8 +973,11 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
999bool process_record_user (uint16_t keycode, keyrecord_t *record) { 973bool process_record_user (uint16_t keycode, keyrecord_t *record) {
1000#if KEYLOGGER_ENABLE 974#if KEYLOGGER_ENABLE
1001 if (log_enable) { 975 if (log_enable) {
1002 xprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col, 976 uint8_t layer = biton32(layer_state);
1003 record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak"); 977
978 if ((layer == ADORE) || (layer == BASE))
979 uprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col,
980 record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak");
1004 } 981 }
1005#endif 982#endif
1006 983
@@ -1047,8 +1024,8 @@ void qk_ucis_symbol_fallback (void) {
1047 for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { 1024 for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) {
1048 uint8_t code; 1025 uint8_t code;
1049 1026
1050 if (qk_ucis_state.codes[i] > KF_1) 1027 if ((qk_ucis_state.codes[i] >= M(A_1)) && (qk_ucis_state.codes[i] <= M(A_0)))
1051 code = qk_ucis_state.codes[i] - KF_1 + KC_1; 1028 code = qk_ucis_state.codes[i] - M(A_1) + KC_1;
1052 else 1029 else
1053 code = qk_ucis_state.codes[i]; 1030 code = qk_ucis_state.codes[i];
1054 register_code(code); 1031 register_code(code);
diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md
index 5e7adb332..f15b67652 100644
--- a/keyboards/ergodox/keymaps/algernon/readme.md
+++ b/keyboards/ergodox/keymaps/algernon/readme.md
@@ -18,12 +18,11 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs]
18* [Layouts](#layouts) 18* [Layouts](#layouts)
19 - [Base layer](#base-layer) 19 - [Base layer](#base-layer)
20 - [ADORE layer](#adore-layer) 20 - [ADORE layer](#adore-layer)
21 - [Hungarian layer](#hungarian-layer)
22 - [Navigation and media layer](#navigation-and-media-layer)
23 - [Steno layer](#steno-layer) 21 - [Steno layer](#steno-layer)
24 - [LED states](#led-states) 22 - [LED states](#led-states)
25* [Tools](#tools) 23* [Tools](#tools)
26 - [Heatmap](#heatmap) 24 - [Heatmap](#heatmap)
25 - [Layer notification](#layer-notification)
27* [Special features](#special-features) 26* [Special features](#special-features)
28 - [Unicode Symbol Input](#unicode-symbol-input) 27 - [Unicode Symbol Input](#unicode-symbol-input)
29* [Building](#building) 28* [Building](#building)
@@ -39,7 +38,7 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs]
39 38
40At its core, this is a Dvorak layout, with some minor changes. The more interesting parts are how certain keys behave: 39At its core, this is a Dvorak layout, with some minor changes. The more interesting parts are how certain keys behave:
41 40
42* The keys on the number row double as function keys, when held for a bit longer than an usual tap. This allows me to use the function keys without having to switch layers. 41* The number row is the same as in the [ADORE](#adore-layer) layer. The function keys are on the **Media** layer.
43* The `Shift`, `Alt`, and `Control` modifiers are one-shot. When tapped, they are considered active for the next key press only. When double tapped, they toggle on, until a third, single tap sometime later. When held, they act as expected. My usual pattern is that I use these for the next keypress only, so this behaviour is perfect. If I need them held, I'll just double-tap. 42* The `Shift`, `Alt`, and `Control` modifiers are one-shot. When tapped, they are considered active for the next key press only. When double tapped, they toggle on, until a third, single tap sometime later. When held, they act as expected. My usual pattern is that I use these for the next keypress only, so this behaviour is perfect. If I need them held, I'll just double-tap.
44* The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout. 43* The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout.
45* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode. 44* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode.
@@ -57,28 +56,16 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest
57 - `LEAD d` toggles logging keypress positions to the HID console. 56 - `LEAD d` toggles logging keypress positions to the HID console.
58 - `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader. 57 - `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader.
59 - `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode. 58 - `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode.
59
60The symbols on the front in the image above have the same color as the key that activates them, with the exception of the **Arrow** layer, which is just black on the front.
60 61
61## ADORE layer 62## ADORE layer
62 63
63[![ADORE layer](images/adore-layer.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a) 64[![ADORE layer](images/adore-layer.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a)
64 65
65While using the standard Dvorak layout, I encountered a number of inconveniences, and on this layer, I am playing with ideas to make the layout feel better. Initially, it was based on [Capewell-Dvorak][cpd], but that too, had shortcomings I was not happy with. So now this is something inbetween, with own observations thrown in. How it works out in the long run remains to be seen. 66My experimental layout, that I keep tweaking. No full description here, because things are very much in flux.
66 67
67 [cpd]: http://www.michaelcapewell.com/projects/keyboard/layout_capewell-dvorak.htm 68Note that the **HUN** layer does not work well with ADORE: it still has the same layout as on the [Base](#base-layer) layer. This will remain until ADORE becomes the default.
68
69Based on a week and a half of typing, the keys were rearranged, and the home row neatly spelled out **ADORE**, that gave the layout its name.
70
71## Hungarian layer
72
73[![Hungarian layer](images/hun-layer.png)](http://www.keyboard-layout-editor.com/#/gists/b160f6ec90d58c127c114c89f66e9dc9)
74
75On this layer, the accented characters are at the same position as their base variant. For some, which can have other diatribes, the long one is on top, short's on bottom. Tapping any of the accented characters takes us back to the base layer.
76
77## Navigation and media layer
78
79[![Navigation and media layer](images/nav-n-media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/c59c453f9fe1a3238ba1494e7e5c6892)
80
81This layer is primarily for navigating with the cursor or the mouse, and some media things.
82 69
83## Steno layer 70## Steno layer
84 71
@@ -93,8 +80,8 @@ The primary purpose of the LEDs is to show the modifier status, a secondary, to
93For the layers, the following rules apply: 80For the layers, the following rules apply:
94 81
95* When the [ADORE layer](#adore-layer) is toggled on, LEDs will light up from left to right in a sequence, then turn off. When the layer is toggled off, the LEDs light up and turn off in the other direction. No LEDs are on while the layer is active. 82* When the [ADORE layer](#adore-layer) is toggled on, LEDs will light up from left to right in a sequence, then turn off. When the layer is toggled off, the LEDs light up and turn off in the other direction. No LEDs are on while the layer is active.
96* When the [Hungarian layer](#hungarian-layer) is active, the *green* and *blue* LEDs are on. 83* When the **Hungarian** layer is active, the *green* and *blue* LEDs are on.
97* When the [Navigation and media layer](#navigation-and-media-layer) is active, the *red* and *green* ones are on. 84* When the **Media** layer is active, the *red* and *green* ones are on.
98* When the **ARROW** layer is active, the *red* and *blue* ones are on. 85* When the **ARROW** layer is active, the *red* and *blue* ones are on.
99* For the [Steno layer](#steno-layer), all LEDs will be turned on. 86* For the [Steno layer](#steno-layer), all LEDs will be turned on.
100 87
@@ -129,6 +116,10 @@ The generated heatmap looks somewhat like this:
129 116
130 ![Heatmap](images/heatmap.png) 117 ![Heatmap](images/heatmap.png)
131 118
119## Layer notification
120
121There is a very small tool in `tools/layer-notify`, that listens to the HID console, looking for layer change events, and pops up a notification for every detected change. It is a very simple tool, mainly serving as an example.
122
132# Building 123# Building
133 124
134To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this: 125To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this:
@@ -156,6 +147,43 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
156 147
157# Changelog 148# Changelog
158 149
150## v1.7
151
152*2016-09-18*
153
154### Overall changes
155
156* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers.
157* The number/function key behavior was changed: function keys are now on the **Media**.
158* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers.
159* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped.
160* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it.
161
162### ADORE
163
164* `Y` and `X` have been swapped again.
165
166### Media/Navigation layer
167
168* The function keys are now on this layer.
169* Mouse keys have been removed.
170* Media start/stop/prev/next have been removed.
171* `Print screen` has been removed.
172* There is only one screen lock key now.
173
174### Heatmap
175
176* Fixed a few issues in the finger-stats calculation.
177* The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool.
178* The heatmap tool will now colorize the stats by default.
179* The periodic stats are now printed in a more compact format.
180
181### Tools
182
183* Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes.
184* Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator.
185* A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side.
186
159## v1.6 187## v1.6
160 188
161*2016-08-24* 189*2016-08-24*
@@ -174,7 +202,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
174### Miscellaneous changes 202### Miscellaneous changes
175 203
176* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. 204* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one.
177* The mouse acceleration keys on the [Navigation and Media](#navigation-and-media-layer) layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. 205* The mouse acceleration keys on the **Navigation/Media** layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off.
178* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now. 206* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now.
179 207
180### Heatmap 208### Heatmap
@@ -221,7 +249,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
221* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. 249* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted.
222* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers. 250* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers.
223* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access. 251* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access.
224* The **Emacs** layer is gone, replaced by a simplified [navigation and media](#navigation-and-media-layer) layer. 252* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer.
225* `LEAD v` types the firmware version, and the keymap version. 253* `LEAD v` types the firmware version, and the keymap version.
226* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped. 254* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped.
227* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers. 255* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers.
@@ -240,7 +268,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the
240 - `-` on the left half was replaced by `Tab`. 268 - `-` on the left half was replaced by `Tab`.
241 - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key. 269 - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key.
242 - `:` now inputs `;` when shifted. 270 - `:` now inputs `;` when shifted.
243* `ESC` cancels the [Hungarian](#hungarian-layer) layer too, not just modifiers. 271* `ESC` cancels the **Hungarian** layer too, not just modifiers.
244 272
245## v1.0 273## v1.0
246 274
diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
index 4dfa877a7..502d1e6ea 100644
--- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
+++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
@@ -13,18 +13,15 @@
13 [ 13 [
14 { 14 {
15 "x": 3.5, 15 "x": 3.5,
16 "c": "#a7d0db",
17 "fa": [ 16 "fa": [
18 0, 17 0,
19 0, 18 0,
20 2 19 2
21 ] 20 ]
22 }, 21 },
23 "#\n3\nF3", 22 "*\n5\nF5",
24 { 23 {
25 "x": 10.5, 24 "x": 10.5,
26 "c": "#a7d0db",
27 "t": "#000000",
28 "a": 4, 25 "a": 4,
29 "fa": [ 26 "fa": [
30 0, 27 0,
@@ -32,54 +29,44 @@
32 2 29 2
33 ] 30 ]
34 }, 31 },
35 "*\n8\nF8" 32 "#\n4\nF4"
36 ], 33 ],
37 [ 34 [
38 { 35 {
39 "y": -0.875, 36 "y": -0.875,
40 "x": 2.5, 37 "x": 2.5
41 "c": "#bfbad1",
42 "t": "#0d0d0b"
43 }, 38 },
44 "@\n2\nF2", 39 "@\n7\nF7",
45 { 40 {
46 "x": 1, 41 "x": 1
47 "c": "#7adabd",
48 "t": "#000000"
49 }, 42 },
50 "$\n4\nF4", 43 "^\n3\nF3",
51 { 44 {
52 "x": 8.5 45 "x": 8.5
53 }, 46 },
54 "&\n7\nF7", 47 "!\n2\nF2",
55 { 48 {
56 "x": 1, 49 "x": 1
57 "c": "#bfbad1",
58 "t": "#0d0d0b"
59 }, 50 },
60 "(\n9\nF9" 51 "&\n6\nF6"
61 ], 52 ],
62 [ 53 [
63 { 54 {
64 "y": -0.875, 55 "y": -0.875,
65 "x": 5.5, 56 "x": 5.5
66 "c": "#7adabd",
67 "t": "#000000"
68 }, 57 },
69 "%\n5\nF5", 58 "$\n1\nF1",
70 { 59 {
71 "c": "#f9cd31",
72 "a": 7, 60 "a": 7,
73 "f": 2 61 "f": 3
74 }, 62 },
75 "STENO", 63 "F11",
76 { 64 {
77 "x": 4.5, 65 "x": 4.5,
78 "f": 3 66 "f": 3
79 }, 67 },
80 "F12", 68 "F12",
81 { 69 {
82 "c": "#7adabd",
83 "a": 4, 70 "a": 4,
84 "f": 3, 71 "f": 3,
85 "fa": [ 72 "fa": [
@@ -88,19 +75,17 @@
88 2 75 2
89 ] 76 ]
90 }, 77 },
91 "^\n6\nF6" 78 "%\n0\nF10"
92 ], 79 ],
93 [ 80 [
94 { 81 {
95 "y": -0.875, 82 "y": -0.875,
96 "c": "#ffb2d2",
97 "f": 9, 83 "f": 9,
98 "a": 6, 84 "a": 6,
99 "w": 1.5 85 "w": 1.5
100 }, 86 },
101 "\n\n<i class='kb kb-Multimedia-Play-Pause'></i>", 87 "\n\n<i class='kb kb-Multimedia-Play-Pause'></i>",
102 { 88 {
103 "t": "#0d0d0b",
104 "f": 3, 89 "f": 3,
105 "a": 4, 90 "a": 4,
106 "fa": [ 91 "fa": [
@@ -109,23 +94,21 @@
109 2 94 2
110 ] 95 ]
111 }, 96 },
112 "!\n1\nF1", 97 " \n9\nF9",
113 { 98 {
114 "x": 14.5 99 "x": 14.5
115 }, 100 },
116 ")\n0\nF10", 101 " \n8\nF8",
117 { 102 {
118 "a": 7, 103 "a": 7,
119 "w": 1.5 104 "w": 1.5
120 }, 105 },
121 "F11" 106 "STENO"
122 ], 107 ],
123 [ 108 [
124 { 109 {
125 "y": -0.375, 110 "y": -0.375,
126 "x": 3.5, 111 "x": 3.5,
127 "c": "#a7d0db",
128 "t": "#000000",
129 "a": 6 112 "a": 6
130 }, 113 },
131 "G", 114 "G",
@@ -138,15 +121,11 @@
138 { 121 {
139 "y": -0.875, 122 "y": -0.875,
140 "x": 2.5, 123 "x": 2.5,
141 "c": "#bfbad1",
142 "t": "#0d0d0b",
143 "a": 6 124 "a": 6
144 }, 125 },
145 "W", 126 "W",
146 { 127 {
147 "x": 1, 128 "x": 1,
148 "c": "#7adabd",
149 "t": "#000000",
150 "a": 6 129 "a": 6
151 }, 130 },
152 "L", 131 "L",
@@ -155,22 +134,17 @@
155 }, 134 },
156 "H", 135 "H",
157 { 136 {
158 "x": 1, 137 "x": 1
159 "c": "#bfbad1",
160 "t": "#0d0d0b"
161 }, 138 },
162 "P" 139 "P"
163 ], 140 ],
164 [ 141 [
165 { 142 {
166 "y": -0.875, 143 "y": -0.875,
167 "x": 5.5, 144 "x": 5.5
168 "c": "#7adabd",
169 "t": "#000000"
170 }, 145 },
171 "M", 146 "M",
172 { 147 {
173 "c": "#93c9b7",
174 "a": 4, 148 "a": 4,
175 "fa": [0, 0, 0], 149 "fa": [0, 0, 0],
176 "h": 1.5 150 "h": 1.5
@@ -182,7 +156,6 @@
182 }, 156 },
183 "}\n)\n]", 157 "}\n)\n]",
184 { 158 {
185 "c": "#7adabd",
186 "a": 6 159 "a": 6
187 }, 160 },
188 "F" 161 "F"
@@ -190,24 +163,21 @@
190 [ 163 [
191 { 164 {
192 "y": -0.875, 165 "y": -0.875,
193 "c": "#ffb07b",
194 "t": "#0d0d0b",
195 "f": 3, 166 "f": 3,
196 "a": 4, 167 "a": 4,
197 "w": 1.5 168 "w": 1.5
198 }, 169 },
199 "\n\n~\n`", 170 "\n\n~\n`",
200 { 171 {
201 "c": "#ffb2d2",
202 "a": 6, 172 "a": 6,
203 "f": 3 173 "f": 3
204 }, 174 },
205 "Y", 175 "X",
206 { 176 {
207 "x": 14.5, 177 "x": 14.5,
208 "a": 6 178 "a": 6
209 }, 179 },
210 "X", 180 "Y",
211 { 181 {
212 "a": 4, 182 "a": 4,
213 "w": 1.5 183 "w": 1.5
@@ -218,8 +188,6 @@
218 { 188 {
219 "y": -0.375, 189 "y": -0.375,
220 "x": 3.5, 190 "x": 3.5,
221 "c": "#a7d0db",
222 "t": "#000000",
223 "a": 6 191 "a": 6
224 }, 192 },
225 "E", 193 "E",
@@ -231,15 +199,11 @@
231 [ 199 [
232 { 200 {
233 "y": -0.875, 201 "y": -0.875,
234 "x": 2.5, 202 "x": 2.5
235 "c": "#bfbad1",
236 "t": "#0d0d0b"
237 }, 203 },
238 "O", 204 "O",
239 { 205 {
240 "x": 1, 206 "x": 1,
241 "c": "#7adabd",
242 "t": "#000000",
243 "n": true 207 "n": true
244 }, 208 },
245 "I", 209 "I",
@@ -249,18 +213,14 @@
249 }, 213 },
250 "R", 214 "R",
251 { 215 {
252 "x": 1, 216 "x": 1
253 "c": "#bfbad1",
254 "t": "#0d0d0b"
255 }, 217 },
256 "N" 218 "N"
257 ], 219 ],
258 [ 220 [
259 { 221 {
260 "y": -0.875, 222 "y": -0.875,
261 "x": 5.5, 223 "x": 5.5
262 "c": "#7adabd",
263 "t": "#000000"
264 }, 224 },
265 "U", 225 "U",
266 { 226 {
@@ -271,8 +231,6 @@
271 [ 231 [
272 { 232 {
273 "y": -0.875, 233 "y": -0.875,
274 "c": "#ffb2d2",
275 "t": "#0d0d0b",
276 "fa": [ 234 "fa": [
277 6 235 6
278 ], 236 ],
@@ -308,22 +266,21 @@
308 { 266 {
309 "y": -0.625, 267 "y": -0.625,
310 "x": 6.5, 268 "x": 6.5,
311 "c": "#93c9b7", 269 "a": 7,
312 "t": "#000000", 270 "f": 9,
313 "h": 1.5 271 "h": 1.5
314 }, 272 },
315 ";\n:", 273 "<i class='fa fa-columns'></i>",
316 { 274 {
317 "x": 4.5, 275 "x": 4.5,
318 "h": 1.5 276 "h": 1.5
319 }, 277 },
320 "_\n-" 278 "<i class='fa fa-table'></i>"
321 ], 279 ],
322 [ 280 [
323 { 281 {
324 "y": -0.75, 282 "y": -0.75,
325 "x": 3.5, 283 "x": 3.5,
326 "c": "#a7d0db",
327 "a": 4, 284 "a": 4,
328 "f": 3 285 "f": 3
329 }, 286 },
@@ -339,15 +296,11 @@
339 { 296 {
340 "y": -0.875, 297 "y": -0.875,
341 "x": 2.5, 298 "x": 2.5,
342 "c": "#bfbad1",
343 "t": "#0d0d0b",
344 "a": 6 299 "a": 6
345 }, 300 },
346 "Q", 301 "Q",
347 { 302 {
348 "x": 1, 303 "x": 1,
349 "c": "#7adabd",
350 "t": "#000000",
351 "a": 4 304 "a": 4
352 }, 305 },
353 "<\n,", 306 "<\n,",
@@ -357,9 +310,7 @@
357 }, 310 },
358 "K", 311 "K",
359 { 312 {
360 "x": 1, 313 "x": 1
361 "c": "#bfbad1",
362 "t": "#0d0d0b"
363 }, 314 },
364 "J" 315 "J"
365 ], 316 ],
@@ -367,8 +318,6 @@
367 { 318 {
368 "y": -0.875, 319 "y": -0.875,
369 "x": 5.5, 320 "x": 5.5,
370 "c": "#7adabd",
371 "t": "#000000",
372 "a": 4 321 "a": 4
373 }, 322 },
374 ">\n.", 323 ">\n.",
@@ -381,15 +330,12 @@
381 [ 330 [
382 { 331 {
383 "y": -0.875, 332 "y": -0.875,
384 "c": "#ffb07b",
385 "f": 9, 333 "f": 9,
386 "w": 1.5, 334 "w": 1.5,
387 "g": true 335 "g": true
388 }, 336 },
389 "", 337 "",
390 { 338 {
391 "c": "#ffb2d2",
392 "t": "#0d0d0b",
393 "a": 6, 339 "a": 6,
394 "f": 3, 340 "f": 3,
395 "g": false 341 "g": false
@@ -401,8 +347,6 @@
401 }, 347 },
402 "?\n/", 348 "?\n/",
403 { 349 {
404 "c": "#ffb07b",
405 "t": "#000000",
406 "f": 9, 350 "f": 9,
407 "g": true, 351 "g": true,
408 "w": 1.5, 352 "w": 1.5,
@@ -414,7 +358,6 @@
414 { 358 {
415 "y": -0.375, 359 "y": -0.375,
416 "x": 3.5, 360 "x": 3.5,
417 "c": "#d9dae0",
418 "g": true, 361 "g": true,
419 "a": 7, 362 "a": 7,
420 "f": 3 363 "f": 3
@@ -433,18 +376,16 @@
433 "", 376 "",
434 { 377 {
435 "x": 1, 378 "x": 1,
436 "c": "#d4872a", 379 "g": false,
437 "g": true,
438 "a": 5 380 "a": 5
439 }, 381 },
440 "", 382 ";\n:",
441 { 383 {
442 "x": 8.5 384 "x": 8.5
443 }, 385 },
444 "", 386 "_\n-",
445 { 387 {
446 "x": 1, 388 "x": 1,
447 "c": "#d9dae0",
448 "g": true, 389 "g": true,
449 "a": 7 390 "a": 7
450 }, 391 },
@@ -472,7 +413,6 @@
472 "ry": 4.25, 413 "ry": 4.25,
473 "y": -1, 414 "y": -1,
474 "x": 1, 415 "x": 1,
475 "c": "#f9cd31",
476 "g": false 416 "g": false
477 }, 417 },
478 "Alt", 418 "Alt",
@@ -489,7 +429,6 @@
489 ], 429 ],
490 [ 430 [
491 { 431 {
492 "c": "#d4872a",
493 "a": 7, 432 "a": 7,
494 "f": 9, 433 "f": 9,
495 "h": 2 434 "h": 2
@@ -500,15 +439,13 @@
500 }, 439 },
501 "<i class='fa fa-angle-double-up'></i>", 440 "<i class='fa fa-angle-double-up'></i>",
502 { 441 {
503 "c": "#f9cd31",
504 "f": 3 442 "f": 3
505 }, 443 },
506 "Ctrl" 444 "Ctrl"
507 ], 445 ],
508 [ 446 [
509 { 447 {
510 "x": 2, 448 "x": 2
511 "c": "#e26757"
512 }, 449 },
513 "ESC" 450 "ESC"
514 ], 451 ],
@@ -518,7 +455,6 @@
518 "rx": 13, 455 "rx": 13,
519 "y": -1, 456 "y": -1,
520 "x": -3, 457 "x": -3,
521 "c": "#f9cd31",
522 "f": 2 458 "f": 2
523 }, 459 },
524 "MEDIA", 460 "MEDIA",
@@ -531,7 +467,6 @@
531 }, 467 },
532 "HUN", 468 "HUN",
533 { 469 {
534 "c": "#d4872a",
535 "f": 9, 470 "f": 9,
536 "h": 2 471 "h": 2
537 }, 472 },
@@ -545,7 +480,6 @@
545 [ 480 [
546 { 481 {
547 "x": -3, 482 "x": -3,
548 "c": "#f9cd31",
549 "f": 2 483 "f": 2
550 }, 484 },
551 "LEAD" 485 "LEAD"
diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json
index 1248d36af..5b4ca06c3 100644
--- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json
+++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json
@@ -13,18 +13,15 @@
13 [ 13 [
14 { 14 {
15 "x": 3.5, 15 "x": 3.5,
16 "c": "#a7d0db",
17 "fa": [ 16 "fa": [
18 0, 17 0,
19 0, 18 0,
20 2 19 2
21 ] 20 ]
22 }, 21 },
23 "#\n3\nF3", 22 "*\n5\nF5",
24 { 23 {
25 "x": 10.5, 24 "x": 10.5,
26 "c": "#a7d0db",
27 "t": "#000000",
28 "a": 4, 25 "a": 4,
29 "fa": [ 26 "fa": [
30 0, 27 0,
@@ -32,54 +29,44 @@
32 2 29 2
33 ] 30 ]
34 }, 31 },
35 "*\n8\nF8" 32 "#\n4\nF4"
36 ], 33 ],
37 [ 34 [
38 { 35 {
39 "y": -0.875, 36 "y": -0.875,
40 "x": 2.5, 37 "x": 2.5
41 "c": "#bfbad1",
42 "t": "#0d0d0b"
43 }, 38 },
44 "@\n2\nF2", 39 "@\n7\nF7",
45 { 40 {
46 "x": 1, 41 "x": 1
47 "c": "#7adabd",
48 "t": "#000000"
49 }, 42 },
50 "$\n4\nF4", 43 "^\n3\nF3",
51 { 44 {
52 "x": 8.5 45 "x": 8.5
53 }, 46 },
54 "&\n7\nF7", 47 "!\n2\nF2",
55 { 48 {
56 "x": 1, 49 "x": 1
57 "c": "#bfbad1",
58 "t": "#0d0d0b"
59 }, 50 },
60 "(\n9\nF9" 51 "&\n6\nF6"
61 ], 52 ],
62 [ 53 [
63 { 54 {
64 "y": -0.875, 55 "y": -0.875,
65 "x": 5.5, 56 "x": 5.5
66 "c": "#7adabd",
67 "t": "#000000"
68 }, 57 },
69 "%\n5\nF5", 58 "$\n1\nF1",
70 { 59 {
71 "c": "#f9cd31",
72 "a": 7, 60 "a": 7,
73 "f": 2 61 "f": 3
74 }, 62 },
75 "STENO", 63 "F11",
76 { 64 {
77 "x": 4.5, 65 "x": 4.5,
78 "f": 3 66 "f": 3
79 }, 67 },
80 "F12", 68 "F12",
81 { 69 {
82 "c": "#7adabd",
83 "a": 4, 70 "a": 4,
84 "f": 3, 71 "f": 3,
85 "fa": [ 72 "fa": [
@@ -88,12 +75,11 @@
88 2 75 2
89 ] 76 ]
90 }, 77 },
91 "^\n6\nF6" 78 "%\n0\nF10"
92 ], 79 ],
93 [ 80 [
94 { 81 {
95 "y": -0.875, 82 "y": -0.875,
96 "c": "#ffb2d2",
97 "f": 6, 83 "f": 6,
98 "a": 6, 84 "a": 6,
99 "w": 1.5 85 "w": 1.5
@@ -101,7 +87,6 @@
101 "<i class='fa fa-fast-backward'></i>\n\n<i class='fa fa-fast-forward'></i>", 87 "<i class='fa fa-fast-backward'></i>\n\n<i class='fa fa-fast-forward'></i>",
102 { 88 {
103 "f": 3, 89 "f": 3,
104 "t": "#0d0d0b",
105 "a": 4, 90 "a": 4,
106 "fa": [ 91 "fa": [
107 0, 92 0,
@@ -110,23 +95,21 @@
110 ] 95 ]
111 96
112 }, 97 },
113 "!\n1\nF1", 98 " \n9\nF9",
114 { 99 {
115 "x": 14.5 100 "x": 14.5
116 }, 101 },
117 ")\n0\nF10", 102 " \n8\nF8",
118 { 103 {
119 "a": 7, 104 "a": 7,
120 "w": 1.5 105 "w": 1.5
121 }, 106 },
122 "F11" 107 "STENO"
123 ], 108 ],
124 [ 109 [
125 { 110 {
126 "y": -0.375, 111 "y": -0.375,
127 "x": 3.5, 112 "x": 3.5,
128 "c": "#a7d0db",
129 "t": "#000000",
130 "a": 4 113 "a": 4
131 }, 114 },
132 ">\n.", 115 ">\n.",
@@ -140,15 +123,11 @@
140 { 123 {
141 "y": -0.875, 124 "y": -0.875,
142 "x": 2.5, 125 "x": 2.5,
143 "c": "#bfbad1",
144 "t": "#0d0d0b",
145 "a": 4 126 "a": 4
146 }, 127 },
147 "<\n,", 128 "<\n,",
148 { 129 {
149 "x": 1, 130 "x": 1,
150 "c": "#7adabd",
151 "t": "#000000",
152 "a": 6 131 "a": 6
153 }, 132 },
154 "P", 133 "P",
@@ -157,22 +136,17 @@
157 }, 136 },
158 "G", 137 "G",
159 { 138 {
160 "x": 1, 139 "x": 1
161 "c": "#bfbad1",
162 "t": "#0d0d0b"
163 }, 140 },
164 "R" 141 "R"
165 ], 142 ],
166 [ 143 [
167 { 144 {
168 "y": -0.875, 145 "y": -0.875,
169 "x": 5.5, 146 "x": 5.5
170 "c": "#7adabd",
171 "t": "#000000"
172 }, 147 },
173 "Y", 148 "Y",
174 { 149 {
175 "c": "#93c9b7",
176 "a": 4, 150 "a": 4,
177 "h": 1.5 151 "h": 1.5
178 }, 152 },
@@ -183,7 +157,6 @@
183 }, 157 },
184 "}\n)\n]", 158 "}\n)\n]",
185 { 159 {
186 "c": "#7adabd",
187 "a": 6 160 "a": 6
188 }, 161 },
189 "F" 162 "F"
@@ -191,14 +164,12 @@
191 [ 164 [
192 { 165 {
193 "y": -0.875, 166 "y": -0.875,
194 "c": "#ffb07b",
195 "t": "#0d0d0b",
196 "f": 3, 167 "f": 3,
168 "a": 4,
197 "w": 1.5 169 "w": 1.5
198 }, 170 },
199 "\n\n~\n`", 171 "\n\n~\n`",
200 { 172 {
201 "c": "#ffb2d2",
202 "a": 4, 173 "a": 4,
203 "f": 3 174 "f": 3
204 }, 175 },
@@ -218,8 +189,6 @@
218 { 189 {
219 "y": -0.375, 190 "y": -0.375,
220 "x": 3.5, 191 "x": 3.5,
221 "c": "#a7d0db",
222 "t": "#000000",
223 "a": 6 192 "a": 6
224 }, 193 },
225 "E", 194 "E",
@@ -231,15 +200,11 @@
231 [ 200 [
232 { 201 {
233 "y": -0.875, 202 "y": -0.875,
234 "x": 2.5, 203 "x": 2.5
235 "c": "#bfbad1",
236 "t": "#0d0d0b"
237 }, 204 },
238 "O", 205 "O",
239 { 206 {
240 "x": 1, 207 "x": 1,
241 "c": "#7adabd",
242 "t": "#000000",
243 "n": true 208 "n": true
244 }, 209 },
245 "U", 210 "U",
@@ -249,18 +214,14 @@
249 }, 214 },
250 "H", 215 "H",
251 { 216 {
252 "x": 1, 217 "x": 1
253 "c": "#bfbad1",
254 "t": "#0d0d0b"
255 }, 218 },
256 "N" 219 "N"
257 ], 220 ],
258 [ 221 [
259 { 222 {
260 "y": -0.875, 223 "y": -0.875,
261 "x": 5.5, 224 "x": 5.5
262 "c": "#7adabd",
263 "t": "#000000"
264 }, 225 },
265 "I", 226 "I",
266 { 227 {
@@ -271,8 +232,6 @@
271 [ 232 [
272 { 233 {
273 "y": -0.875, 234 "y": -0.875,
274 "c": "#ffb2d2",
275 "t": "#0d0d0b",
276 "fa": [ 235 "fa": [
277 6 236 6
278 ], 237 ],
@@ -308,23 +267,22 @@
308 { 267 {
309 "y": -0.625, 268 "y": -0.625,
310 "x": 6.5, 269 "x": 6.5,
311 "c": "#93c9b7",
312 "t": "#000000",
313 "a": 7, 270 "a": 7,
271 "f": 9,
314 "h": 1.5 272 "h": 1.5
315 }, 273 },
316 "(", 274 "<i class='fa fa-columns'></i>",
317 { 275 {
318 "x": 4.5, 276 "x": 4.5,
319 "h": 1.5 277 "h": 1.5
320 }, 278 },
321 ")" 279 "<i class='fa fa-table'></i>"
322 ], 280 ],
323 [ 281 [
324 { 282 {
325 "y": -0.75, 283 "y": -0.75,
326 "x": 3.5, 284 "x": 3.5,
327 "c": "#a7d0db", 285 "f": 3,
328 "a": 6 286 "a": 6
329 }, 287 },
330 "J", 288 "J",
@@ -336,15 +294,11 @@
336 [ 294 [
337 { 295 {
338 "y": -0.875, 296 "y": -0.875,
339 "x": 2.5, 297 "x": 2.5
340 "c": "#bfbad1",
341 "t": "#0d0d0b"
342 }, 298 },
343 "Q", 299 "Q",
344 { 300 {
345 "x": 1, 301 "x": 1
346 "c": "#7adabd",
347 "t": "#000000"
348 }, 302 },
349 "K", 303 "K",
350 { 304 {
@@ -352,18 +306,14 @@
352 }, 306 },
353 "M", 307 "M",
354 { 308 {
355 "x": 1, 309 "x": 1
356 "c": "#bfbad1",
357 "t": "#0d0d0b"
358 }, 310 },
359 "V" 311 "V"
360 ], 312 ],
361 [ 313 [
362 { 314 {
363 "y": -0.875, 315 "y": -0.875,
364 "x": 5.5, 316 "x": 5.5
365 "c": "#7adabd",
366 "t": "#000000"
367 }, 317 },
368 "X", 318 "X",
369 { 319 {
@@ -374,14 +324,11 @@
374 [ 324 [
375 { 325 {
376 "y": -0.875, 326 "y": -0.875,
377 "c": "#ffb07b",
378 "f": 9, 327 "f": 9,
379 "w": 1.5 328 "w": 1.5
380 }, 329 },
381 "\n\n<i class='kb kb-Multimedia-Play-Pause'></i>", 330 "\n\n<i class='kb kb-Multimedia-Play-Pause'></i>",
382 { 331 {
383 "c": "#ffb2d2",
384 "t": "#0d0d0b",
385 "a": 4, 332 "a": 4,
386 "f": 3 333 "f": 3
387 }, 334 },
@@ -392,8 +339,6 @@
392 }, 339 },
393 "Z", 340 "Z",
394 { 341 {
395 "c": "#ffb07b",
396 "t": "#000000",
397 "f": 9, 342 "f": 9,
398 "w": 1.5 343 "w": 1.5
399 }, 344 },
@@ -403,7 +348,6 @@
403 { 348 {
404 "y": -0.375, 349 "y": -0.375,
405 "x": 3.5, 350 "x": 3.5,
406 "c": "#d9dae0",
407 "g": true, 351 "g": true,
408 "a": 7, 352 "a": 7,
409 "f": 3 353 "f": 3
@@ -422,7 +366,6 @@
422 "", 366 "",
423 { 367 {
424 "x": 1, 368 "x": 1,
425 "c": "#d4872a",
426 "g": false, 369 "g": false,
427 "a": 5 370 "a": 5
428 }, 371 },
@@ -433,7 +376,6 @@
433 "_\n-", 376 "_\n-",
434 { 377 {
435 "x": 1, 378 "x": 1,
436 "c": "#d9dae0",
437 "g": true, 379 "g": true,
438 "a": 7 380 "a": 7
439 }, 381 },
@@ -461,7 +403,6 @@
461 "ry": 4.25, 403 "ry": 4.25,
462 "y": -1, 404 "y": -1,
463 "x": 1, 405 "x": 1,
464 "c": "#f9cd31",
465 "g": false 406 "g": false
466 }, 407 },
467 "Alt", 408 "Alt",
@@ -478,7 +419,6 @@
478 ], 419 ],
479 [ 420 [
480 { 421 {
481 "c": "#d4872a",
482 "a": 7, 422 "a": 7,
483 "f": 9, 423 "f": 9,
484 "h": 2 424 "h": 2
@@ -489,15 +429,13 @@
489 }, 429 },
490 "<i class='fa fa-angle-double-up'></i>", 430 "<i class='fa fa-angle-double-up'></i>",
491 { 431 {
492 "c": "#f9cd31",
493 "f": 3 432 "f": 3
494 }, 433 },
495 "Ctrl" 434 "Ctrl"
496 ], 435 ],
497 [ 436 [
498 { 437 {
499 "x": 2, 438 "x": 2
500 "c": "#e26757"
501 }, 439 },
502 "ESC" 440 "ESC"
503 ], 441 ],
@@ -507,7 +445,6 @@
507 "rx": 13, 445 "rx": 13,
508 "y": -1, 446 "y": -1,
509 "x": -3, 447 "x": -3,
510 "c": "#f9cd31",
511 "f": 2 448 "f": 2
512 }, 449 },
513 "MEDIA", 450 "MEDIA",
@@ -520,7 +457,6 @@
520 }, 457 },
521 "LEAD", 458 "LEAD",
522 { 459 {
523 "c": "#d4872a",
524 "f": 9, 460 "f": 9,
525 "h": 2 461 "h": 2
526 }, 462 },
@@ -534,7 +470,6 @@
534 [ 470 [
535 { 471 {
536 "x": -3, 472 "x": -3,
537 "c": "#f9cd31",
538 "f": 2 473 "f": 2
539 }, 474 },
540 "HUN" 475 "HUN"
diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands
new file mode 100755
index 000000000..f3b83cf6d
--- /dev/null
+++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands
@@ -0,0 +1,61 @@
1#!/bin/bash
2set -e
3
4cmd_wm () {
5 WIN="$(xdotool getactivewindow)"
6 wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
7 xdotool windowsize ${WIN} 100% 100%
8 wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
9}
10
11_cmd_appsel () {
12 wmctrl -x -a $1 || true
13 xdotool key Escape
14}
15
16cmd_appsel_music () {
17 wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true
18 xdotool key Escape
19}
20
21cmd_appsel_slack () {
22 _cmd_appsel slack
23}
24
25cmd_appsel_emacs () {
26 _cmd_appsel emacs24
27}
28
29cmd_appsel_term () {
30 _cmd_appsel gnome-terminal
31}
32
33cmd_appsel_chrome () {
34 _cmd_appsel chromium
35}
36
37cmd_help () {
38 cat <<EOF
39Use the source, Luke!
40EOF
41}
42
43while read l; do
44 case "$l" in
45 "CMD:"*)
46 ;;
47 *)
48 continue
49 ;;
50 esac
51
52 cmd="$(echo $l | cut -d: -f2-)"
53
54 echo "Got command: ${cmd}"
55
56 if type cmd_${cmd} >/dev/null 2>&1; then
57 cmd_${cmd}
58 fi
59done
60
61
diff --git a/keyboards/ergodox/keymaps/algernon/tools/layer-notify b/keyboards/ergodox/keymaps/algernon/tools/layer-notify
new file mode 100755
index 000000000..627c2861e
--- /dev/null
+++ b/keyboards/ergodox/keymaps/algernon/tools/layer-notify
@@ -0,0 +1,12 @@
1#!/bin/sh
2HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"
3
4sudo "${HL}" | grep --line-buffered LAYER: | \
5(while read line; do
6 case $line in
7 LAYER:*)
8 layer="$(echo $(echo $line | cut -d: -f2-))"
9 notify-send -i mark-location-symbolic "Switched to layer: $layer"
10 ;;
11 esac
12 done)
diff --git a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py
index 68585843b..09c737646 100755
--- a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py
+++ b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py
@@ -1,12 +1,15 @@
1#! /usr/bin/env python 1#! /usr/bin/env python3
2import json 2import json
3import os 3import os
4import sys 4import sys
5import re 5import re
6import argparse 6import argparse
7import time
7 8
8from math import floor 9from math import floor
9from os.path import dirname 10from os.path import dirname
11from subprocess import Popen, PIPE, STDOUT
12from blessings import Terminal
10 13
11class Heatmap(object): 14class Heatmap(object):
12 coords = [ 15 coords = [
@@ -33,7 +36,7 @@ class Heatmap(object):
33 [ 36 [
34 # Row 4 37 # Row 4
35 [20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [], 38 [20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [],
36 [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], 39 [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], [], [], [], []
37 ], 40 ],
38 [ 41 [
39 # Row 5 42 # Row 5
@@ -56,11 +59,13 @@ class Heatmap(object):
56 def set_attr(orig, new): 59 def set_attr(orig, new):
57 return new 60 return new
58 61
59 def set_bg(self, (block, n), color): 62 def set_bg(self, coords, color):
63 (block, n) = coords
60 self.set_attr_at(block, n, "c", self.set_attr, color) 64 self.set_attr_at(block, n, "c", self.set_attr, color)
61 #self.set_attr_at(block, n, "g", self.set_attr, False) 65 #self.set_attr_at(block, n, "g", self.set_attr, False)
62 66
63 def set_tap_info(self, (block, n), count, cap): 67 def set_tap_info(self, coords, count, cap):
68 (block, n) = coords
64 def _set_tap_info(o, _count, _cap): 69 def _set_tap_info(o, _count, _cap):
65 ns = 4 - o.count ("\n") 70 ns = 4 - o.count ("\n")
66 return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100) 71 return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100)
@@ -87,8 +92,8 @@ class Heatmap(object):
87 g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1] 92 g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1]
88 b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2] 93 b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2]
89 94
90 r, g, b = [x * 255 for x in r, g, b] 95 r, g, b = [x * 255 for x in (r, g, b)]
91 return "#%02x%02x%02x" % (r, g, b) 96 return "#%02x%02x%02x" % (int(r), int(g), int(b))
92 97
93 def __init__(self, layout): 98 def __init__(self, layout):
94 self.log = {} 99 self.log = {}
@@ -96,7 +101,8 @@ class Heatmap(object):
96 self.max_cnt = 0 101 self.max_cnt = 0
97 self.layout = layout 102 self.layout = layout
98 103
99 def update_log(self, (c, r)): 104 def update_log(self, coords):
105 (c, r) = coords
100 if not (c, r) in self.log: 106 if not (c, r) in self.log:
101 self.log[(c, r)] = 0 107 self.log[(c, r)] = 0
102 self.log[(c, r)] = self.log[(c, r)] + 1 108 self.log[(c, r)] = self.log[(c, r)] + 1
@@ -132,18 +138,17 @@ class Heatmap(object):
132 # right hand 138 # right hand
133 [0, 0, 0, 0, 0] 139 [0, 0, 0, 0, 0]
134 ] 140 ]
135 finger_map = [0, 0, 1, 2, 3, 4, 4] 141 finger_map = [0, 0, 1, 2, 3, 3, 3, 1, 1, 1, 2, 3, 4, 4]
136 for (c, r) in self.log: 142 for (c, r) in self.log:
137 if r == 5: # thumb cluster 143 if r == 5: # thumb cluster
138 if c <= 6: # left side 144 if c <= 6: # left side
139 usage[0][4] = usage[0][4] + self.log[(c, r)] 145 usage[0][4] = usage[0][4] + self.log[(c, r)]
140 else: 146 else:
141 usage[1][4] = usage[1][4] + self.log[(c, r)] 147 usage[1][0] = usage[1][0] + self.log[(c, r)]
142 else: 148 else:
143 fc = c 149 fc = c
144 hand = 0 150 hand = 0
145 if fc >= 7: 151 if fc >= 7:
146 fc = fc - 7
147 hand = 1 152 hand = 1
148 fm = finger_map[fc] 153 fm = finger_map[fc]
149 usage[hand][fm] = usage[hand][fm] + self.log[(c, r)] 154 usage[hand][fm] = usage[hand][fm] + self.log[(c, r)]
@@ -157,79 +162,158 @@ class Heatmap(object):
157 if total == 0: 162 if total == 0:
158 total = 1 163 total = 1
159 stats = { 164 stats = {
165 "total-keys": total,
160 "hands": { 166 "hands": {
161 "left": { 167 "left": {
162 "usage": float(hand_usage[0]) / total * 100, 168 "usage": round(float(hand_usage[0]) / total * 100, 2),
163 "fingers": { 169 "fingers": {
164 "0 - pinky": 0, 170 "pinky": 0,
165 "1 - ring": 0, 171 "ring": 0,
166 "2 - middle": 0, 172 "middle": 0,
167 "3 - index": 0, 173 "index": 0,
168 "4 - thumb": 0, 174 "thumb": 0,
169 } 175 }
170 }, 176 },
171 "right": { 177 "right": {
172 "usage": float(hand_usage[1]) / total * 100, 178 "usage": round(float(hand_usage[1]) / total * 100, 2),
173 "fingers": { 179 "fingers": {
174 "0 - thumb": 0, 180 "thumb": 0,
175 "1 - index": 0, 181 "index": 0,
176 "2 - middle": 0, 182 "middle": 0,
177 "3 - ring": 0, 183 "ring": 0,
178 "4 - pinky": 0, 184 "pinky": 0,
179 } 185 }
180 }, 186 },
181 } 187 }
182 } 188 }
183 189
184 hmap = ['left', 'right'] 190 hmap = ['left', 'right']
185 fmap = ['0 - pinky', '1 - ring', '2 - middle', '3 - index', '4 - thumb', 191 fmap = ['pinky', 'ring', 'middle', 'index', 'thumb',
186 '0 - thumb', '1 - index', '2 - middle', '3 - ring', '4 - pinky'] 192 'thumb', 'index', 'middle', 'ring', 'pinky']
187 for hand_idx in range(len(usage)): 193 for hand_idx in range(len(usage)):
188 hand = usage[hand_idx] 194 hand = usage[hand_idx]
189 for finger_idx in range(len(hand)): 195 for finger_idx in range(len(hand)):
190 stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = float(hand[finger_idx]) / total * 100 196 stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = round(float(hand[finger_idx]) / total * 100, 2)
191 return stats 197 return stats
192 198
193def dump_all(out_dir, heatmaps): 199def dump_all(out_dir, heatmaps):
194 for layer in heatmaps.keys(): 200 stats = {}
201 t = Terminal()
202 t.clear()
203 sys.stdout.write("\x1b[2J\x1b[H")
204
205 print ('{t.underline}{outdir}{t.normal}\n'.format(t=t, outdir=out_dir))
206
207 keys = list(heatmaps.keys())
208 keys.sort()
209
210 for layer in keys:
195 if len(heatmaps[layer].log) == 0: 211 if len(heatmaps[layer].log) == 0:
196 continue 212 continue
197 213
198 with open ("%s/%s.json" % (out_dir, layer), "w") as f: 214 with open ("%s/%s.json" % (out_dir, layer), "w") as f:
199 json.dump(heatmaps[layer].get_heatmap(), f) 215 json.dump(heatmaps[layer].get_heatmap(), f)
200 print >>sys.stderr, "%s stats:" % (layer) 216 stats[layer] = heatmaps[layer].get_stats()
201 json.dump (heatmaps[layer].get_stats(), sys.stderr,
202 indent = 4, sort_keys = True)
203 print >>sys.stderr, ""
204 print >>sys.stderr, ""
205 217
206def main(opts): 218 left = stats[layer]['hands']['left']
219 right = stats[layer]['hands']['right']
220
221 print ('{t.bold}{layer}{t.normal} ({total:,} taps):'.format(t=t, layer=layer,
222 total=int(stats[layer]['total-keys'] / 2)))
223 print (('{t.underline} | ' + \
224 'left ({l[usage]:6.2f}%) | ' + \
225 'right ({r[usage]:6.2f}%) |{t.normal}').format(t=t, l=left, r=right))
226 print ((' {t.bright_magenta}pinky{t.white} | {left[pinky]:6.2f}% | {right[pinky]:6.2f}% |\n' + \
227 ' {t.bright_cyan}ring{t.white} | {left[ring]:6.2f}% | {right[ring]:6.2f}% |\n' + \
228 ' {t.bright_blue}middle{t.white} | {left[middle]:6.2f}% | {right[middle]:6.2f}% |\n' + \
229 ' {t.bright_green}index{t.white} | {left[index]:6.2f}% | {right[index]:6.2f}% |\n' + \
230 ' {t.bright_red}thumb{t.white} | {left[thumb]:6.2f}% | {right[thumb]:6.2f}% |\n' + \
231 '').format(left=left['fingers'], right=right['fingers'], t=t))
232
233def process_line(line, heatmaps, opts, stamped_log = None):
234 m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line)
235 if not m:
236 return False
237 if stamped_log is not None:
238 if line.startswith("KL:"):
239 print ("%10.10f %s" % (time.time(), line),
240 file = stamped_log, end = '')
241 else:
242 print (line,
243 file = stamped_log, end = '')
244 stamped_log.flush()
245
246 (c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4))
247 if (c, r) not in opts.allowed_keys:
248 return False
249
250 heatmaps[l].update_log ((c, r))
251
252 return True
253
254def setup_allowed_keys(opts):
255 if len(opts.only_key):
256 incmap={}
257 for v in opts.only_key:
258 m = re.search ('(\d+),(\d+)', v)
259 if not m:
260 continue
261 (c, r) = (int(m.group(1)), int(m.group(2)))
262 incmap[(c, r)] = True
263 else:
264 incmap={}
265 for r in range(0, 6):
266 for c in range(0, 14):
267 incmap[(c, r)] = True
207 268
269 for v in opts.ignore_key:
270 m = re.search ('(\d+),(\d+)', v)
271 if not m:
272 continue
273 (c, r) = (int(m.group(1)), int(m.group(2)))
274 del(incmap[(c, r)])
275
276 return incmap
277
278def main(opts):
208 heatmaps = {"Dvorak": Heatmap("Dvorak"), 279 heatmaps = {"Dvorak": Heatmap("Dvorak"),
209 "ADORE": Heatmap("ADORE") 280 "ADORE": Heatmap("ADORE")
210 } 281 }
211 cnt = 0 282 cnt = 0
212 restrict_row = opts.restrict_row
213 out_dir = opts.outdir 283 out_dir = opts.outdir
214 284
285 if not os.path.exists(out_dir):
286 os.makedirs(out_dir)
287
288 opts.allowed_keys = setup_allowed_keys(opts)
289
290 if not opts.one_shot:
291
292 try:
293 with open("%s/stamped-log" % out_dir, "r") as f:
294 while True:
295 line = f.readline()
296 if not line:
297 break
298 if not process_line(line, heatmaps, opts):
299 continue
300 except:
301 pass
302
303 stamped_log = open ("%s/stamped-log" % (out_dir), "a+")
304 else:
305 stamped_log = None
306
215 while True: 307 while True:
216 line = sys.stdin.readline() 308 line = sys.stdin.readline()
217 if not line: 309 if not line:
218 break 310 break
219 m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line) 311 if not process_line(line, heatmaps, opts, stamped_log):
220 if not m:
221 continue 312 continue
222 313
223 cnt = cnt + 1 314 cnt = cnt + 1
224 (c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4))
225 if restrict_row != -1 and r != restrict_row:
226 continue
227 if c in opts.ignore_columns:
228 continue
229
230 heatmaps[l].update_log ((c, r))
231 315
232 if opts.dump_interval != -1 and cnt >= opts.dump_interval: 316 if opts.dump_interval != -1 and cnt >= opts.dump_interval and not opts.one_shot:
233 cnt = 0 317 cnt = 0
234 dump_all(out_dir, heatmaps) 318 dump_all(out_dir, heatmaps)
235 319
@@ -239,11 +323,17 @@ if __name__ == "__main__":
239 parser = argparse.ArgumentParser (description = "keylog to heatmap processor") 323 parser = argparse.ArgumentParser (description = "keylog to heatmap processor")
240 parser.add_argument ('outdir', action = 'store', 324 parser.add_argument ('outdir', action = 'store',
241 help = 'Output directory') 325 help = 'Output directory')
242 parser.add_argument ('--row', dest = 'restrict_row', action = 'store', type = int,
243 default = -1, help = 'Restrict processing to this row only')
244 parser.add_argument ('--dump-interval', dest = 'dump_interval', action = 'store', type = int, 326 parser.add_argument ('--dump-interval', dest = 'dump_interval', action = 'store', type = int,
245 default = 100, help = 'Dump stats and heatmap at every Nth event, -1 for dumping at EOF only') 327 default = 100, help = 'Dump stats and heatmap at every Nth event, -1 for dumping at EOF only')
246 parser.add_argument ('--ignore-column', dest = 'ignore_columns', action = 'append', type = int, 328 parser.add_argument ('--ignore-key', dest = 'ignore_key', action = 'append', type = str,
247 default = [], help = 'Ignore the specified columns') 329 default = [], help = 'Ignore the key at position (x, y)')
330 parser.add_argument ('--only-key', dest = 'only_key', action = 'append', type = str,
331 default = [], help = 'Only include key at position (x, y)')
332 parser.add_argument ('--one-shot', dest = 'one_shot', action = 'store_true',
333 help = 'Do not load previous data, and do not update it, either.')
248 args = parser.parse_args() 334 args = parser.parse_args()
335 if len(args.ignore_key) and len(args.only_key):
336 print ("--ignore-key and --only-key are mutually exclusive, please only use one of them!",
337 file = sys.stderr)
338 sys.exit(1)
249 main(args) 339 main(args)
diff --git a/keyboards/ergodox/keymaps/algernon/tools/max-focused b/keyboards/ergodox/keymaps/algernon/tools/max-focused
deleted file mode 100755
index 4d5220aa8..000000000
--- a/keyboards/ergodox/keymaps/algernon/tools/max-focused
+++ /dev/null
@@ -1,5 +0,0 @@
1#! /bin/sh
2WIN="$(xdotool getactivewindow)"
3wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz
4xdotool windowsize ${WIN} 100% 100%
5wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz
diff --git a/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py b/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py
new file mode 100755
index 000000000..e068c3cbf
--- /dev/null
+++ b/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py
@@ -0,0 +1,107 @@
1#!/usr/bin/env python3
2
3import os
4import sys
5
6charmap = {
7 '9': [[1, 0]],
8 '7': [[2, 0]], '@': [[2, 5], [2, 0]],
9 '5': [[3, 0]], '*': [[2, 5], [3, 0]],
10 '3': [[4, 0]], '^': [[2, 5], [4, 0]],
11 '1': [[5, 0]], '$': [[2, 5], [5, 0]],
12 '0': [[8, 0]], '%': [[2, 5], [8, 0]],
13 '2': [[9, 0]], '!': [[2, 5], [9, 0]],
14 '4': [[10, 0]], '#': [[2, 5], [10, 0]],
15 '6': [[11, 0]], '&': [[2, 5], [11, 0]],
16 '8': [[12, 0]],
17
18 '`': [[0, 1]], '~': [[2, 5], [0, 1]],
19 'y': [[1, 1]], 'Y': [[2, 5], [1, 1]],
20 'w': [[2, 1]], 'W': [[2, 5], [2, 1]],
21 'g': [[3, 1]], 'G': [[2, 5], [3, 1]],
22 'l': [[4, 1]], 'L': [[2, 5], [4, 1]],
23 'm': [[5, 1]], 'M': [[2, 5], [5, 1]],
24 '[': [[6, 1]], '{': [[2, 5], [6, 1]], '(': [[6, 1], [6, 1]],
25 ']': [[7, 1]], '}': [[2, 5], [7, 1]], ')': [[7, 1], [7, 1]],
26 'f': [[8, 1]], 'F': [[2, 5], [8, 1]],
27 'h': [[9, 1]], 'H': [[2, 5], [9, 1]],
28 'c': [[10, 1]], 'C': [[2, 5], [10, 1]],
29 'p': [[11, 1]], 'P': [[2, 5], [11, 1]],
30 'x': [[12, 1]], 'X': [[2, 5], [12, 1]],
31 '\\': [[13, 1]], '|': [[2, 5], [13, 1]],
32
33 '\t': [[0, 2]],
34 'a': [[1, 2]], 'A': [[2, 5], [1, 2]],
35 'o': [[2, 2]], 'O': [[2, 5], [2, 2]],
36 'e': [[3, 2]], 'E': [[2, 5], [3, 2]],
37 'i': [[4, 2]], 'I': [[2, 5], [4, 2]],
38 'u': [[5, 2]], 'U': [[2, 5], [5, 2]],
39 'd': [[8, 2]], 'D': [[2, 5], [8, 2]],
40 'r': [[9, 2]], 'R': [[2, 5], [9, 2]],
41 't': [[10, 2]], 'T': [[2, 5], [10, 2]],
42 'n': [[11, 2]], 'N': [[2, 5], [11, 2]],
43 's': [[12, 2]], 'S': [[2, 5], [12, 2]],
44 '=': [[13, 2]], '+': [[2, 5], [13, 2]],
45
46 'z': [[1, 3]], 'Z': [[2, 5], [1, 3]],
47 'q': [[2, 3]], 'Q': [[2, 5], [2, 3]],
48 '\'': [[3, 3]], '"': [[2, 5], [3, 3]],
49 ',': [[4, 3]], '<': [[2, 5], [4, 3]],
50 '.': [[5, 3]], '>': [[2, 5], [5, 3]],
51 'b': [[8, 3]], 'B': [[2, 5], [8, 3]],
52 'k': [[9, 3]], 'K': [[2, 5], [9, 3]],
53 'v': [[10, 3]], 'V': [[2, 5], [10, 3]],
54 'j': [[11, 3]], 'J': [[2, 5], [11, 3]],
55 '/': [[12, 3]], '?': [[2, 5], [12, 3]],
56
57 ':': [[4, 4]], ';': [[4, 4], [4, 4]],
58 '-': [[9, 4]], '_': [[2, 5], [9, 4]],
59
60 ' ': [[10, 5]],
61 '\n': [[11, 5]],
62
63 ## Layered things
64 # Hungarian
65 'á': [[9, 5], [1, 2]], 'Á': [[2, 5], [9, 5], [1, 2]],
66 'ó': [[9, 5], [2, 2]], 'Ó': [[2, 5], [9, 5], [2, 2]],
67 'ő': [[9, 5], [2, 1]], 'Ő': [[2, 5], [9, 5], [2, 1]],
68 'ö': [[9, 5], [2, 3]], 'Ö': [[2, 5], [9, 5], [2, 3]],
69 'é': [[9, 5], [3, 2]], 'É': [[2, 5], [9, 5], [3, 2]],
70 'ú': [[9, 5], [4, 2]], 'Ú': [[2, 5], [9, 5], [4, 2]],
71 'ű': [[9, 5], [4, 1]], 'Ű': [[2, 5], [9, 5], [4, 1]],
72 'ü': [[9, 5], [4, 3]], 'Ü': [[2, 5], [9, 5], [4, 3]],
73 'í': [[9, 5], [5, 2]], 'Í': [[2, 5], [9, 5], [5, 2]],
74}
75
76def lookup_char(layer, ch):
77 if ch in charmap:
78 return charmap[ch]
79 return None
80
81def process_char(layer, ch, out=sys.stdout):
82 keys = lookup_char(layer, ch)
83 if not keys:
84 print ("Unknown char: %s" % ch, file=sys.stderr)
85 else:
86 for (c, r) in keys:
87 print ("KL: col=%d, row=%d, pressed=1, layer=%s" % (r, c, layer), file=out)
88 print ("KL: col=%d, row=%d, pressed=0, layer=%s" % (r, c, layer), file=out)
89
90def process_file(fn, layer, out=sys.stdout):
91 with open(fn, "r") as f:
92 ch = f.read(1)
93 while ch:
94 process_char(layer, ch, out)
95 ch = f.read(1)
96
97if sys.argv[1] == '-':
98 out='/dev/stdin'
99else:
100 out=sys.argv[1]
101
102if len(sys.argv) >= 2:
103 layer = 'ADORE'
104else:
105 layer = sys.argv[2]
106
107process_file(out, layer = layer)
diff --git a/keyboards/ergodox/keymaps/default/keymap.c b/keyboards/ergodox/keymaps/default/keymap.c
index 1b80cb3a2..2f399bd18 100644
--- a/keyboards/ergodox/keymaps/default/keymap.c
+++ b/keyboards/ergodox/keymaps/default/keymap.c
@@ -7,6 +7,8 @@
7#define SYMB 1 // symbols 7#define SYMB 1 // symbols
8#define MDIA 2 // media keys 8#define MDIA 2 // media keys
9 9
10#define EPRM M(1) // Macro 1: Reset EEPROM
11
10const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 12const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
11/* Keymap 0: Basic layer 13/* Keymap 0: Basic layer
12 * 14 *
@@ -62,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
62 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| 64 * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------|
63 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | 65 * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | |
64 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' 66 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
65 * | | | | | | | | . | 0 | = | | 67 * | EPRM | | | | | | | . | 0 | = | |
66 * `----------------------------------' `----------------------------------' 68 * `----------------------------------' `----------------------------------'
67 * ,-------------. ,-------------. 69 * ,-------------. ,-------------.
68 * | | | | | | 70 * | | | | | |
@@ -79,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
79 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, 81 KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS,
80 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, 82 KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV,
81 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, 83 KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS,
82 KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, 84 EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,
83 KC_TRNS,KC_TRNS, 85 KC_TRNS,KC_TRNS,
84 KC_TRNS, 86 KC_TRNS,
85 KC_TRNS,KC_TRNS,KC_TRNS, 87 KC_TRNS,KC_TRNS,KC_TRNS,
@@ -149,6 +151,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
149 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); 151 SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
150 } 152 }
151 break; 153 break;
154 case 1:
155 if (record->event.pressed) { // For resetting EEPROM
156 eeconfig_init();
157 }
158 break;
152 } 159 }
153 return MACRO_NONE; 160 return MACRO_NONE;
154}; 161};
@@ -158,6 +165,7 @@ void matrix_init_user(void) {
158 165
159}; 166};
160 167
168
161// Runs constantly in the background, in a loop. 169// Runs constantly in the background, in a loop.
162void matrix_scan_user(void) { 170void matrix_scan_user(void) {
163 171
diff --git a/keyboards/ergodox/keymaps/default/readme.md b/keyboards/ergodox/keymaps/default/readme.md
index 8f6dba45e..f68138ed6 100644
--- a/keyboards/ergodox/keymaps/default/readme.md
+++ b/keyboards/ergodox/keymaps/default/readme.md
@@ -2,6 +2,8 @@
2 2
3## Changelog 3## Changelog
4 4
5* Sep 22, 2016:
6 * Created a new key in layer 1 (bottom-corner key) that resets the EEPROM.
5* Feb 2, 2016 (V1.1): 7* Feb 2, 2016 (V1.1):
6 * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows). 8 * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows).
7 9
diff --git a/keyboards/kc60/config.h b/keyboards/kc60/config.h
index c4a9b9ff8..29695d0b9 100644
--- a/keyboards/kc60/config.h
+++ b/keyboards/kc60/config.h
@@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
62//#define MATRIX_HAS_GHOST 62//#define MATRIX_HAS_GHOST
63 63
64/* number of backlight levels */ 64/* number of backlight levels */
65#define BACKLIGHT_LEVELS 3 65#define BACKLIGHT_LEVELS 5
66 66
67/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ 67/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
68#define LOCKING_SUPPORT_ENABLE 68#define LOCKING_SUPPORT_ENABLE
diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h
index ec99514aa..f4d900acc 100644
--- a/keyboards/lets_split/config.h
+++ b/keyboards/lets_split/config.h
@@ -41,6 +41,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
41 41
42// #define USE_I2C 42// #define USE_I2C
43 43
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
44// #define EE_HANDS 49// #define EE_HANDS
45 50
46#define I2C_MASTER_LEFT 51#define I2C_MASTER_LEFT
@@ -94,4 +99,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
94//#define NO_ACTION_MACRO 99//#define NO_ACTION_MACRO
95//#define NO_ACTION_FUNCTION 100//#define NO_ACTION_FUNCTION
96 101
97#endif \ No newline at end of file 102#endif
diff --git a/keyboards/lets_split/i2c.c b/keyboards/lets_split/i2c.c
index c72789403..084c890c4 100644
--- a/keyboards/lets_split/i2c.c
+++ b/keyboards/lets_split/i2c.c
@@ -6,6 +6,8 @@
6#include <stdbool.h> 6#include <stdbool.h>
7#include "i2c.h" 7#include "i2c.h"
8 8
9#ifdef USE_I2C
10
9// Limits the amount of we wait for any one i2c transaction. 11// Limits the amount of we wait for any one i2c transaction.
10// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is 12// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is
11// 9 bits, a single transaction will take around 90μs to complete. 13// 9 bits, a single transaction will take around 90μs to complete.
@@ -157,3 +159,4 @@ ISR(TWI_vect) {
157 // Reset everything, so we are ready for the next TWI interrupt 159 // Reset everything, so we are ready for the next TWI interrupt
158 TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); 160 TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN);
159} 161}
162#endif
diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h
new file mode 100644
index 000000000..2671fabf6
--- /dev/null
+++ b/keyboards/lets_split/keymaps/i2c/config.h
@@ -0,0 +1,102 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split
29#define DESCRIPTION A split keyboard for the cheap makers
30
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 8
34#define MATRIX_COLS 6
35
36// wiring of each half
37#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39
40#define CATERINA_BOOTLOADER
41
42#define USE_I2C
43
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
49// #define EE_HANDS
50
51#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT
53
54/* COL2ROW or ROW2COL */
55#define DIODE_DIRECTION COL2ROW
56
57/* define if matrix has ghost */
58//#define MATRIX_HAS_GHOST
59
60/* number of backlight levels */
61// #define BACKLIGHT_LEVELS 3
62
63/* Set 0 if debouncing isn't needed */
64#define DEBOUNCING_DELAY 5
65
66/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
67#define LOCKING_SUPPORT_ENABLE
68/* Locking resynchronize hack */
69#define LOCKING_RESYNC_ENABLE
70
71/* key combination for command */
72#define IS_COMMAND() ( \
73 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
74)
75
76/* ws2812 RGB LED */
77#define RGB_DI_PIN D4
78#define RGBLIGHT_TIMER
79#define RGBLED_NUM 8 // Number of LEDs
80#define RGBLIGHT_HUE_STEP 10
81#define RGBLIGHT_SAT_STEP 17
82#define RGBLIGHT_VAL_STEP 17
83
84/*
85 * Feature disable options
86 * These options are also useful to firmware size reduction.
87 */
88
89/* disable debug print */
90// #define NO_DEBUG
91
92/* disable print */
93// #define NO_PRINT
94
95/* disable action features */
96//#define NO_ACTION_LAYER
97//#define NO_ACTION_TAPPING
98//#define NO_ACTION_ONESHOT
99//#define NO_ACTION_MACRO
100//#define NO_ACTION_FUNCTION
101
102#endif
diff --git a/keyboards/lets_split/keymaps/i2c/keymap.c b/keyboards/lets_split/keymaps/i2c/keymap.c
new file mode 100644
index 000000000..0d2d94b67
--- /dev/null
+++ b/keyboards/lets_split/keymaps/i2c/keymap.c
@@ -0,0 +1,214 @@
1#include "lets_split.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern 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 _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
36 * |------+------+------+------+------+-------------+------+------+------+------+------|
37 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
38 * |------+------+------+------+------+------|------+------+------+------+------+------|
39 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
42 * `-----------------------------------------------------------------------------------'
43 */
44[_QWERTY] = KEYMAP( \
45 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
46 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
47 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
48 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
49),
50
51/* Colemak
52 * ,-----------------------------------------------------------------------------------.
53 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
54 * |------+------+------+------+------+-------------+------+------+------+------+------|
55 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
56 * |------+------+------+------+------+------|------+------+------+------+------+------|
57 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
58 * |------+------+------+------+------+------+------+------+------+------+------+------|
59 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
60 * `-----------------------------------------------------------------------------------'
61 */
62[_COLEMAK] = KEYMAP( \
63 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
64 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
65 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
66 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
67),
68
69/* Dvorak
70 * ,-----------------------------------------------------------------------------------.
71 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
72 * |------+------+------+------+------+-------------+------+------+------+------+------|
73 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
74 * |------+------+------+------+------+------|------+------+------+------+------+------|
75 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
76 * |------+------+------+------+------+------+------+------+------+------+------+------|
77 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
78 * `-----------------------------------------------------------------------------------'
79 */
80[_DVORAK] = KEYMAP( \
81 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
82 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
83 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
84 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
85),
86
87/* Lower
88 * ,-----------------------------------------------------------------------------------.
89 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
90 * |------+------+------+------+------+-------------+------+------+------+------+------|
91 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
92 * |------+------+------+------+------+------|------+------+------+------+------+------|
93 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
94 * |------+------+------+------+------+------+------+------+------+------+------+------|
95 * | | | | | | | | Next | Vol- | Vol+ | Play |
96 * `-----------------------------------------------------------------------------------'
97 */
98[_LOWER] = KEYMAP( \
99 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
100 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
101 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
102 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
103),
104
105/* Raise
106 * ,-----------------------------------------------------------------------------------.
107 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
108 * |------+------+------+------+------+-------------+------+------+------+------+------|
109 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
110 * |------+------+------+------+------+------|------+------+------+------+------+------|
111 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
112 * |------+------+------+------+------+------+------+------+------+------+------+------|
113 * | | | | | | | | Next | Vol- | Vol+ | Play |
114 * `-----------------------------------------------------------------------------------'
115 */
116[_RAISE] = KEYMAP( \
117 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
118 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
119 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
120 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
121),
122
123/* Adjust (Lower + Raise)
124 * ,-----------------------------------------------------------------------------------.
125 * | | Reset| | | | | | | | | | Del |
126 * |------+------+------+------+------+-------------+------+------+------+------+------|
127 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
128 * |------+------+------+------+------+------|------+------+------+------+------+------|
129 * | | | | | | | | | | | | |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | | | | | | | | | | | |
132 * `-----------------------------------------------------------------------------------'
133 */
134[_ADJUST] = KEYMAP( \
135 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
136 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
137 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
138 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
139)
140
141
142};
143
144#ifdef AUDIO_ENABLE
145float tone_qwerty[][2] = SONG(QWERTY_SOUND);
146float tone_dvorak[][2] = SONG(DVORAK_SOUND);
147float tone_colemak[][2] = SONG(COLEMAK_SOUND);
148#endif
149
150void persistant_default_layer_set(uint16_t default_layer) {
151 eeconfig_update_default_layer(default_layer);
152 default_layer_set(default_layer);
153}
154
155bool process_record_user(uint16_t keycode, keyrecord_t *record) {
156 switch (keycode) {
157 case QWERTY:
158 if (record->event.pressed) {
159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
161 #endif
162 persistant_default_layer_set(1UL<<_QWERTY);
163 }
164 return false;
165 break;
166 case COLEMAK:
167 if (record->event.pressed) {
168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
170 #endif
171 persistant_default_layer_set(1UL<<_COLEMAK);
172 }
173 return false;
174 break;
175 case DVORAK:
176 if (record->event.pressed) {
177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
179 #endif
180 persistant_default_layer_set(1UL<<_DVORAK);
181 }
182 return false;
183 break;
184 case LOWER:
185 if (record->event.pressed) {
186 layer_on(_LOWER);
187 update_tri_layer(_LOWER, _RAISE, _ADJUST);
188 } else {
189 layer_off(_LOWER);
190 update_tri_layer(_LOWER, _RAISE, _ADJUST);
191 }
192 return false;
193 break;
194 case RAISE:
195 if (record->event.pressed) {
196 layer_on(_RAISE);
197 update_tri_layer(_LOWER, _RAISE, _ADJUST);
198 } else {
199 layer_off(_RAISE);
200 update_tri_layer(_LOWER, _RAISE, _ADJUST);
201 }
202 return false;
203 break;
204 case ADJUST:
205 if (record->event.pressed) {
206 layer_on(_ADJUST);
207 } else {
208 layer_off(_ADJUST);
209 }
210 return false;
211 break;
212 }
213 return true;
214} \ No newline at end of file
diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h
new file mode 100644
index 000000000..f4d900acc
--- /dev/null
+++ b/keyboards/lets_split/keymaps/serial/config.h
@@ -0,0 +1,102 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x3060
26#define DEVICE_VER 0x0001
27#define MANUFACTURER Wootpatoot
28#define PRODUCT Lets Split
29#define DESCRIPTION A split keyboard for the cheap makers
30
31/* key matrix size */
32// Rows are doubled-up
33#define MATRIX_ROWS 8
34#define MATRIX_COLS 6
35
36// wiring of each half
37#define MATRIX_ROW_PINS { B5, B4, E6, D7 }
38#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 }
39
40#define CATERINA_BOOTLOADER
41
42// #define USE_I2C
43
44// Use serial if not using I2C
45#ifndef USE_I2C
46# define USE_SERIAL
47#endif
48
49// #define EE_HANDS
50
51#define I2C_MASTER_LEFT
52// #define I2C_MASTER_RIGHT
53
54/* COL2ROW or ROW2COL */
55#define DIODE_DIRECTION COL2ROW
56
57/* define if matrix has ghost */
58//#define MATRIX_HAS_GHOST
59
60/* number of backlight levels */
61// #define BACKLIGHT_LEVELS 3
62
63/* Set 0 if debouncing isn't needed */
64#define DEBOUNCING_DELAY 5
65
66/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
67#define LOCKING_SUPPORT_ENABLE
68/* Locking resynchronize hack */
69#define LOCKING_RESYNC_ENABLE
70
71/* key combination for command */
72#define IS_COMMAND() ( \
73 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
74)
75
76/* ws2812 RGB LED */
77#define RGB_DI_PIN D4
78#define RGBLIGHT_TIMER
79#define RGBLED_NUM 8 // Number of LEDs
80#define RGBLIGHT_HUE_STEP 10
81#define RGBLIGHT_SAT_STEP 17
82#define RGBLIGHT_VAL_STEP 17
83
84/*
85 * Feature disable options
86 * These options are also useful to firmware size reduction.
87 */
88
89/* disable debug print */
90// #define NO_DEBUG
91
92/* disable print */
93// #define NO_PRINT
94
95/* disable action features */
96//#define NO_ACTION_LAYER
97//#define NO_ACTION_TAPPING
98//#define NO_ACTION_ONESHOT
99//#define NO_ACTION_MACRO
100//#define NO_ACTION_FUNCTION
101
102#endif
diff --git a/keyboards/lets_split/keymaps/serial/keymap.c b/keyboards/lets_split/keymaps/serial/keymap.c
new file mode 100644
index 000000000..0d2d94b67
--- /dev/null
+++ b/keyboards/lets_split/keymaps/serial/keymap.c
@@ -0,0 +1,214 @@
1#include "lets_split.h"
2#include "action_layer.h"
3#include "eeconfig.h"
4
5extern 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 _QWERTY 0
12#define _COLEMAK 1
13#define _DVORAK 2
14#define _LOWER 3
15#define _RAISE 4
16#define _ADJUST 16
17
18enum custom_keycodes {
19 QWERTY = SAFE_RANGE,
20 COLEMAK,
21 DVORAK,
22 LOWER,
23 RAISE,
24 ADJUST,
25};
26
27// Fillers to make layering more clear
28#define _______ KC_TRNS
29#define XXXXXXX KC_NO
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32
33/* Qwerty
34 * ,-----------------------------------------------------------------------------------.
35 * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
36 * |------+------+------+------+------+-------------+------+------+------+------+------|
37 * | Esc | A | S | D | F | G | H | J | K | L | ; | " |
38 * |------+------+------+------+------+------|------+------+------+------+------+------|
39 * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
40 * |------+------+------+------+------+------+------+------+------+------+------+------|
41 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
42 * `-----------------------------------------------------------------------------------'
43 */
44[_QWERTY] = KEYMAP( \
45 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
46 KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
47 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
48 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
49),
50
51/* Colemak
52 * ,-----------------------------------------------------------------------------------.
53 * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
54 * |------+------+------+------+------+-------------+------+------+------+------+------|
55 * | Esc | A | R | S | T | D | H | N | E | I | O | " |
56 * |------+------+------+------+------+------|------+------+------+------+------+------|
57 * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
58 * |------+------+------+------+------+------+------+------+------+------+------+------|
59 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
60 * `-----------------------------------------------------------------------------------'
61 */
62[_COLEMAK] = KEYMAP( \
63 KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \
64 KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
65 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \
66 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
67),
68
69/* Dvorak
70 * ,-----------------------------------------------------------------------------------.
71 * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
72 * |------+------+------+------+------+-------------+------+------+------+------+------|
73 * | Esc | A | O | E | U | I | D | H | T | N | S | / |
74 * |------+------+------+------+------+------|------+------+------+------+------+------|
75 * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
76 * |------+------+------+------+------+------+------+------+------+------+------+------|
77 * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right |
78 * `-----------------------------------------------------------------------------------'
79 */
80[_DVORAK] = KEYMAP( \
81 KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \
82 KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \
83 KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \
84 ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
85),
86
87/* Lower
88 * ,-----------------------------------------------------------------------------------.
89 * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
90 * |------+------+------+------+------+-------------+------+------+------+------+------|
91 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | |
92 * |------+------+------+------+------+------|------+------+------+------+------+------|
93 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter |
94 * |------+------+------+------+------+------+------+------+------+------+------+------|
95 * | | | | | | | | Next | Vol- | Vol+ | Play |
96 * `-----------------------------------------------------------------------------------'
97 */
98[_LOWER] = KEYMAP( \
99 KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
100 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
101 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \
102 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
103),
104
105/* Raise
106 * ,-----------------------------------------------------------------------------------.
107 * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
108 * |------+------+------+------+------+-------------+------+------+------+------+------|
109 * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
110 * |------+------+------+------+------+------|------+------+------+------+------+------|
111 * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter |
112 * |------+------+------+------+------+------+------+------+------+------+------+------|
113 * | | | | | | | | Next | Vol- | Vol+ | Play |
114 * `-----------------------------------------------------------------------------------'
115 */
116[_RAISE] = KEYMAP( \
117 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
118 KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
119 _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \
120 _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
121),
122
123/* Adjust (Lower + Raise)
124 * ,-----------------------------------------------------------------------------------.
125 * | | Reset| | | | | | | | | | Del |
126 * |------+------+------+------+------+-------------+------+------+------+------+------|
127 * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | |
128 * |------+------+------+------+------+------|------+------+------+------+------+------|
129 * | | | | | | | | | | | | |
130 * |------+------+------+------+------+------+------+------+------+------+------+------|
131 * | | | | | | | | | | | |
132 * `-----------------------------------------------------------------------------------'
133 */
134[_ADJUST] = KEYMAP( \
135 _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \
136 _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \
137 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
138 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
139)
140
141
142};
143
144#ifdef AUDIO_ENABLE
145float tone_qwerty[][2] = SONG(QWERTY_SOUND);
146float tone_dvorak[][2] = SONG(DVORAK_SOUND);
147float tone_colemak[][2] = SONG(COLEMAK_SOUND);
148#endif
149
150void persistant_default_layer_set(uint16_t default_layer) {
151 eeconfig_update_default_layer(default_layer);
152 default_layer_set(default_layer);
153}
154
155bool process_record_user(uint16_t keycode, keyrecord_t *record) {
156 switch (keycode) {
157 case QWERTY:
158 if (record->event.pressed) {
159 #ifdef AUDIO_ENABLE
160 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
161 #endif
162 persistant_default_layer_set(1UL<<_QWERTY);
163 }
164 return false;
165 break;
166 case COLEMAK:
167 if (record->event.pressed) {
168 #ifdef AUDIO_ENABLE
169 PLAY_NOTE_ARRAY(tone_colemak, false, 0);
170 #endif
171 persistant_default_layer_set(1UL<<_COLEMAK);
172 }
173 return false;
174 break;
175 case DVORAK:
176 if (record->event.pressed) {
177 #ifdef AUDIO_ENABLE
178 PLAY_NOTE_ARRAY(tone_dvorak, false, 0);
179 #endif
180 persistant_default_layer_set(1UL<<_DVORAK);
181 }
182 return false;
183 break;
184 case LOWER:
185 if (record->event.pressed) {
186 layer_on(_LOWER);
187 update_tri_layer(_LOWER, _RAISE, _ADJUST);
188 } else {
189 layer_off(_LOWER);
190 update_tri_layer(_LOWER, _RAISE, _ADJUST);
191 }
192 return false;
193 break;
194 case RAISE:
195 if (record->event.pressed) {
196 layer_on(_RAISE);
197 update_tri_layer(_LOWER, _RAISE, _ADJUST);
198 } else {
199 layer_off(_RAISE);
200 update_tri_layer(_LOWER, _RAISE, _ADJUST);
201 }
202 return false;
203 break;
204 case ADJUST:
205 if (record->event.pressed) {
206 layer_on(_ADJUST);
207 } else {
208 layer_off(_ADJUST);
209 }
210 return false;
211 break;
212 }
213 return true;
214} \ No newline at end of file
diff --git a/keyboards/lets_split/matrix.c b/keyboards/lets_split/matrix.c
index 1d768c59b..138969004 100644
--- a/keyboards/lets_split/matrix.c
+++ b/keyboards/lets_split/matrix.c
@@ -28,14 +28,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
28#include "debug.h" 28#include "debug.h"
29#include "util.h" 29#include "util.h"
30#include "matrix.h" 30#include "matrix.h"
31#include "i2c.h"
32#include "serial.h"
33#include "split_util.h" 31#include "split_util.h"
34#include "pro_micro.h" 32#include "pro_micro.h"
35#include "config.h" 33#include "config.h"
36 34
35#ifdef USE_I2C
36# include "i2c.h"
37#else // USE_SERIAL
38# include "serial.h"
39#endif
40
37#ifndef DEBOUNCE 41#ifndef DEBOUNCE
38# define DEBOUNCE 5 42# define DEBOUNCE 5
39#endif 43#endif
40 44
41#define ERROR_DISCONNECT_COUNT 5 45#define ERROR_DISCONNECT_COUNT 5
@@ -145,6 +149,8 @@ uint8_t _matrix_scan(void)
145 return 1; 149 return 1;
146} 150}
147 151
152#ifdef USE_I2C
153
148// Get rows from other half over i2c 154// Get rows from other half over i2c
149int i2c_transaction(void) { 155int i2c_transaction(void) {
150 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; 156 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
@@ -176,7 +182,8 @@ i2c_error: // the cable is disconnceted, or something else went wrong
176 return 0; 182 return 0;
177} 183}
178 184
179#ifndef USE_I2C 185#else // USE_SERIAL
186
180int serial_transaction(void) { 187int serial_transaction(void) {
181 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; 188 int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
182 189
@@ -199,7 +206,7 @@ uint8_t matrix_scan(void)
199 206
200#ifdef USE_I2C 207#ifdef USE_I2C
201 if( i2c_transaction() ) { 208 if( i2c_transaction() ) {
202#else 209#else // USE_SERIAL
203 if( serial_transaction() ) { 210 if( serial_transaction() ) {
204#endif 211#endif
205 // turn on the indicator led when halves are disconnected 212 // turn on the indicator led when halves are disconnected
@@ -235,7 +242,7 @@ void matrix_slave_scan(void) {
235 /* i2c_slave_buffer[i] = matrix[offset+i]; */ 242 /* i2c_slave_buffer[i] = matrix[offset+i]; */
236 i2c_slave_buffer[i] = matrix[offset+i]; 243 i2c_slave_buffer[i] = matrix[offset+i];
237 } 244 }
238#else 245#else // USE_SERIAL
239 for (int i = 0; i < ROWS_PER_HAND; ++i) { 246 for (int i = 0; i < ROWS_PER_HAND; ++i) {
240 serial_slave_buffer[i] = matrix[offset+i]; 247 serial_slave_buffer[i] = matrix[offset+i];
241 } 248 }
@@ -290,7 +297,7 @@ static void init_cols(void)
290static matrix_row_t read_cols(void) 297static matrix_row_t read_cols(void)
291{ 298{
292 matrix_row_t result = 0; 299 matrix_row_t result = 0;
293 for(int x = 0; x < MATRIX_COLS; x++) { 300 for(int x = 0; x < MATRIX_COLS; x++) {
294 result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); 301 result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
295 } 302 }
296 return result; 303 return result;
@@ -298,7 +305,7 @@ static matrix_row_t read_cols(void)
298 305
299static void unselect_rows(void) 306static void unselect_rows(void)
300{ 307{
301 for(int x = 0; x < ROWS_PER_HAND; x++) { 308 for(int x = 0; x < ROWS_PER_HAND; x++) {
302 _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); 309 _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
303 _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); 310 _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
304 } 311 }
diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk
index 6961fbd55..6fde8a444 100644
--- a/keyboards/lets_split/rules.mk
+++ b/keyboards/lets_split/rules.mk
@@ -52,7 +52,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
52OPT_DEFS += -DBOOTLOADER_SIZE=4096 52OPT_DEFS += -DBOOTLOADER_SIZE=4096
53 53
54# Build Options 54# Build Options
55# change to "no" to disable the options, or define them in the Makefile in 55# change to "no" to disable the options, or define them in the Makefile in
56# the appropriate keymap folder that will get included automatically 56# the appropriate keymap folder that will get included automatically
57# 57#
58BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) 58BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
@@ -71,4 +71,4 @@ RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this
71# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 71# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
72SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 72SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
73 73
74CUSTOM_MATRIX = yes \ No newline at end of file 74CUSTOM_MATRIX = yes
diff --git a/keyboards/lets_split/serial.c b/keyboards/lets_split/serial.c
index f439c2f20..6faed09ce 100644
--- a/keyboards/lets_split/serial.c
+++ b/keyboards/lets_split/serial.c
@@ -10,9 +10,10 @@
10#include <avr/interrupt.h> 10#include <avr/interrupt.h>
11#include <util/delay.h> 11#include <util/delay.h>
12#include <stdbool.h> 12#include <stdbool.h>
13
14#include "serial.h" 13#include "serial.h"
15 14
15#ifdef USE_SERIAL
16
16// Serial pulse period in microseconds. Its probably a bad idea to lower this 17// Serial pulse period in microseconds. Its probably a bad idea to lower this
17// value. 18// value.
18#define SERIAL_DELAY 24 19#define SERIAL_DELAY 24
@@ -223,3 +224,5 @@ int serial_update_buffers(void) {
223 sei(); 224 sei();
224 return 0; 225 return 0;
225} 226}
227
228#endif
diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c
index 65003a71a..461921798 100644
--- a/keyboards/lets_split/split_util.c
+++ b/keyboards/lets_split/split_util.c
@@ -6,11 +6,15 @@
6#include <avr/eeprom.h> 6#include <avr/eeprom.h>
7#include "split_util.h" 7#include "split_util.h"
8#include "matrix.h" 8#include "matrix.h"
9#include "i2c.h"
10#include "serial.h"
11#include "keyboard.h" 9#include "keyboard.h"
12#include "config.h" 10#include "config.h"
13 11
12#ifdef USE_I2C
13# include "i2c.h"
14#else
15# include "serial.h"
16#endif
17
14volatile bool isLeftHand = true; 18volatile bool isLeftHand = true;
15 19
16static void setup_handedness(void) { 20static void setup_handedness(void) {
diff --git a/keyboards/planck/keymaps/impossible/Makefile b/keyboards/planck/keymaps/impossible/Makefile
new file mode 100644
index 000000000..581e08cd0
--- /dev/null
+++ b/keyboards/planck/keymaps/impossible/Makefile
@@ -0,0 +1,25 @@
1
2
3# Build Options
4# change to "no" to disable the options, or define them in the Makefile in
5# the appropriate keymap folder that will get included automatically
6#
7BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
8MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
9EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
10CONSOLE_ENABLE = no # Console for debug(+400)
11COMMAND_ENABLE = yes # Commands for debug and configuration
12NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
13BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
14MIDI_ENABLE = no # MIDI controls
15AUDIO_ENABLE = yes # Audio output on port C6
16UNICODE_ENABLE = no # Unicode
17BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
18RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
19
20# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
21SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
22
23ifndef QUANTUM_DIR
24 include ../../../../Makefile
25endif \ No newline at end of file
diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c
new file mode 100644
index 000000000..503976fa2
--- /dev/null
+++ b/keyboards/planck/keymaps/impossible/keymap.c
@@ -0,0 +1,242 @@
1// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
2// this is the style you want to emulate.
3
4#include "planck.h"
5#include "action_layer.h"
6#ifdef AUDIO_ENABLE
7 #include "audio.h"
8#endif
9#include "eeconfig.h"
10
11extern keymap_config_t keymap_config;
12
13// Each layer gets a name for readability, which is then used in the keymap matrix below.
14// The underscores don't mean anything - you can have a layer called STUFF or any other name.
15// Layer names don't all need to be of the same length, obviously, and you can also skip them
16// entirely and just use numbers.
17
18#define _WORKMAN 0
19#define _FN 1
20#define _QWERTY 2
21#define _QW_FN 3
22#define _PLOVER 4
23#define _ADJ 5
24
25enum planck_keycodes {
26 WORKMAN = SAFE_RANGE,
27 QWERTY,
28 PLOVER
29};
30
31// Fillers to make layering more clear
32#define _______ KC_TRNS
33#define XXXXXXX KC_NO
34
35const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36
37/* Workman Alpha-numeric
38 * ,-----------------------------------------------------------------------------------------------.
39 * | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 |
40 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
41 * | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 |
42 * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
43 * | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 |
44 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
45 * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/Ent|
46 * `-----------------------------------------------------------------------------------------------'
47 */
48
49[_WORKMAN] = {
50 {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9},
51 {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6},
52 {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3},
53 {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENT), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJ, KC_ENT)}
54},
55
56/* FN-key held (Workman)
57 * ,-----------------------------------------------------------------------------------------------.
58 * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 |
59 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
60 * | Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 |
61 * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
62 * | Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 |
63 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
64 * |Alt/Tab| Gui | ~ |CTL/Bsp| Fn/Ent|SFT/Spc| ; | Home | PgDn | End | F10 |Adj/Ent|
65 * `-----------------------------------------------------------------------------------------------'
66 */
67
68[_FN] = {
69 {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9},
70 {KC_TAB, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_QUOT, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6},
71 {KC_MENU, _______, _______, KC_EQUAL, KC_BSLS, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3},
72 {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, _______}
73},
74
75/* Qwerty
76 * ,-----------------------------------------------------------------------------------------------.
77 * |Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
78 * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------|
79 * | Ctrl | Q | W | E | R | T | Y | U | I | O | P | / |
80 * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------|
81 * | Shift | A | S | D | F | G | H | J | K | L | ; | " |
82 * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
83 * |Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/Ent|
84 * `-----------------------------------------------------------------------------------------------'
85 */
86
87[_QWERTY] = {
88 {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
89 {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT},
90 {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
91 {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QW_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJ, KC_ENT)},
92},
93
94/* FN-key held (Qwerty)
95 * ,-----------------------------------------------------------------------------------------------.
96 * | Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
97 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
98 * | Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 |
99 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
100 * | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | |
101 * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
102 * |Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent|
103 * `-----------------------------------------------------------------------------------------------'
104 */
105
106[_QW_FN] = {
107 {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11},
108 {_______, KC_GRAVE, KC_LBRC, KC_PGUP, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_UP, KC_EQUAL, XXXXXXX, KC_F12},
109 {_______, KC_TAB, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX},
110 {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______}
111},
112
113/* Plover layer (http://opensteno.org)
114 * ,-----------------------------------------------------------------------------------------------.
115 * | S | T | P | H | * | F | P | L | T | D | | |
116 * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
117 * | S | K | W | R | * | R | B | G | S | Z | | |
118 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
119 * | # | # | # | # | | # | # | # | # | # | | |
120 * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------|
121 * | | | A | O | | E | U | | | | |Adj/Ent|
122 * `-----------------------------------------------------------------------------------------------'
123 */
124
125[_PLOVER] = {
126 {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, KC_LBRC, XXXXXXX, XXXXXXX},
127 {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX},
128 {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX},
129 {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LT(_ADJ, KC_ENT)}
130},
131
132/* Adjust
133 * ,-----------------------------------------------------------------------------------------------.
134 * | | | | | | | | | Insert| PrtSc | Pause | RESET |
135 * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------|
136 * | | | | | | | | CapLk |Voice +| Audio |MIDIoff| |
137 * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------|
138 * | | | | | | | | ScrLk |Voice -| Music |MIDI on| |
139 * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------|
140 * | | | | | | | | Numlk |Workman| Qwerty| Plover|Adj/Ent|
141 * `-----------------------------------------------------------------------------------------------'
142 */
143
144[_ADJ] = {
145 {_______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_PAUSE, RESET},
146 {_______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______},
147 {_______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______},
148 {_______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______}
149}
150
151};
152
153#ifdef AUDIO_ENABLE
154
155float tone_startup[][2] = SONG(STARTUP_SOUND);
156float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
157
158float tone_workman[][2] = SONG(QWERTY_SOUND);
159float tone_qwerty[][2] = SONG(COLEMAK_SOUND);
160float tone_plover[][2] = SONG(PLOVER_SOUND);
161
162float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
163
164#endif
165
166
167void persistant_default_layer_set(uint16_t default_layer) {
168 eeconfig_update_default_layer(default_layer);
169 default_layer_set(default_layer);
170}
171
172bool process_record_user(uint16_t keycode, keyrecord_t *record) {
173 switch (keycode) {
174 case WORKMAN:
175 if (record->event.pressed) {
176 #ifdef AUDIO_ENABLE
177 PLAY_NOTE_ARRAY(tone_workman, false, 0);
178 #endif
179 persistant_default_layer_set(1UL<<_WORKMAN);
180 }
181 return false;
182 break;
183 case QWERTY:
184 if (record->event.pressed) {
185 #ifdef AUDIO_ENABLE
186 PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
187 #endif
188 persistant_default_layer_set(1UL<<_QWERTY);
189 }
190 return false;
191 break;
192 case PLOVER:
193 if (record->event.pressed) {
194 #ifdef AUDIO_ENABLE
195 PLAY_NOTE_ARRAY(tone_plover, false, 0);
196 #endif
197 if (!eeconfig_is_enabled()) {
198 eeconfig_init();
199 }
200 keymap_config.raw = eeconfig_read_keymap();
201 keymap_config.nkro = 1;
202 eeconfig_update_keymap(keymap_config.raw);
203 persistant_default_layer_set(1UL<<_PLOVER);
204 }
205 return false;
206 break;
207 }
208 return true;
209}
210
211void matrix_init_user(void) {
212 #ifdef AUDIO_ENABLE
213 startup_user();
214 #endif
215}
216
217#ifdef AUDIO_ENABLE
218
219void startup_user()
220{
221 _delay_ms(20); // gets rid of tick
222 PLAY_NOTE_ARRAY(tone_startup, false, 0);
223}
224
225void shutdown_user()
226{
227 PLAY_NOTE_ARRAY(tone_goodbye, false, 0);
228 _delay_ms(150);
229 stop_all_notes();
230}
231
232void music_on_user(void)
233{
234 music_scale_user();
235}
236
237void music_scale_user(void)
238{
239 PLAY_NOTE_ARRAY(music_scale, false, 0);
240}
241
242#endif
diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md
new file mode 100644
index 000000000..02c719197
--- /dev/null
+++ b/keyboards/planck/keymaps/impossible/readme.md
@@ -0,0 +1,73 @@
1# The Impossible Layout
2
3The Impossible Layout is named such because it manages to fit in both a numpad and an inverted-T arrow cluster into the same layer as the alpha keys.
4
5## Main layout
6
7The Impossible Layout places the middle column of the alphas onto where the punctuation keys were, moving he most used punctuation to be accessed by the thumbs. Because removing the middle columns fits with the Workman layout's philosopy, Workman is used as the basis for the layout. This means the layout should be very easy to learn for Workman users, and reasonable for Colemak users. Other space gains are made by combining keys that are only ever chorded with other non symbol keys (with function-layer alternatives where needed).
8
9### Alpha-numeric layer
10
11| | | | | | | | | | | | |
12|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
13| Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 |
14| A | S | H | T | G | N | E | O | I | 4 | 5 | 6 |
15| Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 |
16|Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/Ent|
17
18### Function layer
19
20| | | | | | | | | | | | |
21|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
22| ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 |
23| Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 |
24| Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 |
25|Alt/Tab| Gui | ~ |CTL/Bsp| Fn/Ent|SFT/Spc| ; | Home | PgDn | End | F10 |Adj/Ent|
26
27## Qwerty
28
29The Qwerty layer, mostly intended for gaming use, makes use of the doubled chorded/non-symbolic keys to obtain use of the entire alpha-numeric typing area.
30
31### Qwerty layer
32
33| | | | | | | | | | | | |
34|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
35|Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
36| Ctrl | Q | W | E | R | T | Y | U | I | O | P | / |
37| Shift | A | S | D | F | G | H | J | K | L | ; | " |
38|Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/Ent|
39
40### Qwerty Fn Layer
41
42| | | | | | | | | | | | |
43|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
44| Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 |
45| Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 |
46| Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | |
47|Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent|
48
49## Stenography
50
51The Steno/Plover layer moves the number row below the regular keys, providing a much more comfortable placement for the thumb keys. Using this layout will require a slightly different dictionary to account for different keys being adjacent to the number row.
52
53### Steno Layer
54
55| | | | | | | | | | | | |
56|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
57| S | T | P | H | * | F | P | L | T | D | | |
58| S | K | W | R | * | R | B | G | S | Z | | |
59| # | # | # | # | | # | # | # | # | # | | |
60| | | A | O | | E | U | | | | |Adj/Ent|
61
62## Adjustments and Options
63
64In order to switch between layouts and change other keyboard settings, an adjustment layer is accessible from the same position over any layout.
65
66### Adjustment Layer
67
68| | | | | | | | | | | | |
69|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|
70| | | | | | | | | Insert| PrtSc | Pause | RESET |
71| | | | | | | | CapLk |Voice +| Audio |MIDIoff| |
72| | | | | | | | ScrLk |Voice -| Music |MIDI on| |
73| | | | | | | | Numlk |Workman| Qwerty| Plover|Adj/Ent|
diff --git a/keyboards/tada68/Makefile b/keyboards/tada68/Makefile
new file mode 100644
index 000000000..4e2a6f00f
--- /dev/null
+++ b/keyboards/tada68/Makefile
@@ -0,0 +1,3 @@
1ifndef MAKEFILE_INCLUDED
2 include ../../Makefile
3endif \ No newline at end of file
diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h
new file mode 100644
index 000000000..5d8757936
--- /dev/null
+++ b/keyboards/tada68/config.h
@@ -0,0 +1,97 @@
1/*
2Copyright 2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0x6060
26#define DEVICE_VER 0x0003
27#define MANUFACTURER TADA
28#define PRODUCT TADA68
29#define DESCRIPTION QMK keyboard firmware for TADA68 with WS2812 support
30
31/* key matrix size */
32#define MATRIX_ROWS 5
33#define MATRIX_COLS 15
34
35// ROWS: Top to bottom, COLS: Left to right
36
37#define MATRIX_ROW_PINS {D0,D1,F6,F7,D5}
38#define MATRIX_COL_PINS {F0,F1,E6,C7,C6,B7,D4,B1,B0,B5,B4,D7,D6,B3,F4}
39#define UNUSED_PINS
40
41#define BACKLIGHT_PIN B6
42
43/* COL2ROW or ROW2COL */
44#define DIODE_DIRECTION COL2ROW
45
46/* define if matrix has ghost */
47//#define MATRIX_HAS_GHOST
48
49/* Set 0 if debouncing isn't needed */
50#define DEBOUNCING_DELAY 5
51
52/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
53#define LOCKING_SUPPORT_ENABLE
54/* Locking resynchronize hack */
55#define LOCKING_RESYNC_ENABLE
56
57/* key combination for command */
58#define IS_COMMAND() ( \
59 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
60)
61
62/* Backlight configuration
63 */
64#define BACKLIGHT_LEVELS 4
65
66/* Underlight configuration
67 */
68
69/*#define RGB_DI_PIN E2
70#define RGBLIGHT_TIMER
71#define RGBLED_NUM 2 // Number of LEDs
72#define RGBLIGHT_HUE_STEP 10
73#define RGBLIGHT_SAT_STEP 17
74#define RGBLIGHT_VAL_STEP 17*/
75//Disabled while I figure out a suitable pin for RGB support.
76//I've tried F5, D2, D3, and E2 but it's possible the end of my
77//strand is bad. New LEDs on order.
78
79/*
80 * Feature disable options
81 * These options are also useful to firmware size reduction.
82 */
83
84/* disable debug print */
85//#define NO_DEBUG
86
87/* disable print */
88//#define NO_PRINT
89
90/* disable action features */
91//#define NO_ACTION_LAYER
92//#define NO_ACTION_TAPPING
93//#define NO_ACTION_ONESHOT
94//#define NO_ACTION_MACRO
95//#define NO_ACTION_FUNCTION
96
97#endif
diff --git a/keyboards/tada68/keymaps/default/Makefile b/keyboards/tada68/keymaps/default/Makefile
new file mode 100644
index 000000000..2a7ff2779
--- /dev/null
+++ b/keyboards/tada68/keymaps/default/Makefile
@@ -0,0 +1,21 @@
1# Build Options
2# change to "no" to disable the options, or define them in the Makefile in
3# the appropriate keymap folder that will get included automatically
4#
5BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
6MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
7EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
8CONSOLE_ENABLE = no # Console for debug(+400)
9COMMAND_ENABLE = yes # Commands for debug and configuration
10NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
11BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
12MIDI_ENABLE = no # MIDI controls
13AUDIO_ENABLE = no # Audio output on port C6
14UNICODE_ENABLE = no # Unicode
15BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
16RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
17SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
18
19ifndef QUANTUM_DIR
20 include ../../../../Makefile
21endif
diff --git a/keyboards/tada68/keymaps/default/keymap.c b/keyboards/tada68/keymaps/default/keymap.c
new file mode 100644
index 000000000..da57c0343
--- /dev/null
+++ b/keyboards/tada68/keymaps/default/keymap.c
@@ -0,0 +1,98 @@
1#include "tada68.h"
2
3
4// Used for SHIFT_ESC
5#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
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 _BL 0
12#define _FL 1
13
14#define _______ KC_TRNS
15
16const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
17 /* Keymap _BL: (Base Layer) Default Layer
18 * ,----------------------------------------------------------------.
19 * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` |
20 * |----------------------------------------------------------------|
21 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del |
22 * |----------------------------------------------------------------|
23 * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
24 * |----------------------------------------------------------------|
25 * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn|
26 * |----------------------------------------------------------------|
27 * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig |
28 * `----------------------------------------------------------------'
29 */
30[_BL] = KEYMAP_ANSI(
31 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,KC_GRV, \
32 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS,KC_DEL, \
33 KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,KC_PGUP, \
34 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,KC_UP,KC_PGDN, \
35 KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT),
36
37 /* Keymap _FL: Function Layer
38 * ,----------------------------------------------------------------.
39 * | | | | | | | | | | | | | | RESET| |
40 * |----------------------------------------------------------------|
41 * | | | | | | | | | | | |BL-|BL+|BL | |
42 * |----------------------------------------------------------------|
43 * | | | | | | | | | | | | | |
44 * |----------------------------------------------------------------|
45 * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | | |
46 * |----------------------------------------------------------------|
47 * | | | | | | | | | | |
48 * `----------------------------------------------------------------'
49 */
50[_FL] = KEYMAP_ANSI(
51 #ifdef RGBLIGHT_ENABLE
52 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \
53 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \
54 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \
55 _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,_______, \
56 _______,_______,_______, _______, _______,_______,_______,_______,_______, _______),
57 #else
58 _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \
59 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \
60 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \
61 _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \
62 _______,_______,_______, _______, _______,_______,_______,_______,_______, _______),
63 #endif
64};
65
66/*enum function_id {
67 //SHIFT_ESC,
68};
69
70const uint16_t PROGMEM fn_actions[] = {
71 //[0] = ACTION_FUNCTION(SHIFT_ESC),
72};
73
74void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
75 static uint8_t shift_esc_shift_mask;
76 switch (id) {
77 case SHIFT_ESC:
78 shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
79 if (record->event.pressed) {
80 if (shift_esc_shift_mask) {
81 add_key(KC_GRV);
82 send_keyboard_report();
83 } else {
84 add_key(KC_ESC);
85 send_keyboard_report();
86 }
87 } else {
88 if (shift_esc_shift_mask) {
89 del_key(KC_GRV);
90 send_keyboard_report();
91 } else {
92 del_key(KC_ESC);
93 send_keyboard_report();
94 }
95 }
96 break;
97 }
98}*/
diff --git a/keyboards/tada68/keymaps/default/readme.md b/keyboards/tada68/keymaps/default/readme.md
new file mode 100644
index 000000000..36760d6b9
--- /dev/null
+++ b/keyboards/tada68/keymaps/default/readme.md
@@ -0,0 +1 @@
# default TADA68 layout
diff --git a/keyboards/tada68/readme.md b/keyboards/tada68/readme.md
new file mode 100644
index 000000000..552fdea52
--- /dev/null
+++ b/keyboards/tada68/readme.md
@@ -0,0 +1,4 @@
1TADA68 keyboard firmware
2======================
3
4TODO: to be updated.
diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk
new file mode 100644
index 000000000..d8ec42365
--- /dev/null
+++ b/keyboards/tada68/rules.mk
@@ -0,0 +1,66 @@
1
2# MCU name
3#MCU = at90usb1287
4MCU = atmega32u4
5
6# Processor frequency.
7# This will define a symbol, F_CPU, in all source code files equal to the
8# processor frequency in Hz. You can then use this symbol in your source code to
9# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
10# automatically to create a 32-bit value in your source code.
11#
12# This will be an integer division of F_USB below, as it is sourced by
13# F_USB after it has run through any CPU prescalers. Note that this value
14# does not *change* the processor frequency - it should merely be updated to
15# reflect the processor speed set externally so that the code can use accurate
16# software delays.
17F_CPU = 16000000
18
19
20#
21# LUFA specific
22#
23# Target architecture (see library "Board Types" documentation).
24ARCH = AVR8
25
26# Input clock frequency.
27# This will define a symbol, F_USB, in all source code files equal to the
28# input clock frequency (before any prescaling is performed) in Hz. This value may
29# differ from F_CPU if prescaling is used on the latter, and is required as the
30# raw input clock is fed directly to the PLL sections of the AVR for high speed
31# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
32# at the end, this will be done automatically to create a 32-bit value in your
33# source code.
34#
35# If no clock division is performed on the input clock inside the AVR (via the
36# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
37F_USB = $(F_CPU)
38
39# Interrupt driven control endpoint task(+60)
40OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
41
42
43# Boot Section Size in *bytes*
44# Teensy halfKay 512
45# Teensy++ halfKay 1024
46# Atmel DFU loader 4096
47# LUFA bootloader 4096
48# USBaspLoader 2048
49OPT_DEFS += -DBOOTLOADER_SIZE=4096
50
51
52# Build Options
53# comment out to disable the options.
54#
55BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
56MOUSEKEY_ENABLE ?= no # Mouse keys(+4700)
57EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
58CONSOLE_ENABLE ?= yes # Console for debug(+400)
59COMMAND_ENABLE ?= yes # Commands for debug and configuration
60NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
61RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870)
62BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150)
63MIDI_ENABLE ?= no # MIDI controls
64AUDIO_ENABLE ?= no
65UNICODE_ENABLE ?= no # Unicode
66BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/keyboards/tada68/tada68.c b/keyboards/tada68/tada68.c
new file mode 100644
index 000000000..24f89048c
--- /dev/null
+++ b/keyboards/tada68/tada68.c
@@ -0,0 +1,30 @@
1#include "tada68.h"
2#include "led.h"
3
4void matrix_init_kb(void) {
5 // put your keyboard start-up code here
6 // runs once when the firmware starts up
7 matrix_init_user();
8 led_init_ports();
9};
10
11void matrix_scan_kb(void) {
12 // put your looping keyboard code here
13 // runs every cycle (a lot)
14 matrix_scan_user();
15};
16
17void led_init_ports(void) {
18 // * Set our LED pins as output
19 DDRB |= (1<<2);
20}
21
22void led_set_kb(uint8_t usb_led) {
23 if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
24 // Turn capslock on
25 PORTB &= ~(1<<2);
26 } else {
27 // Turn capslock off
28 PORTB |= (1<<2);
29 }
30}
diff --git a/keyboards/tada68/tada68.h b/keyboards/tada68/tada68.h
new file mode 100644
index 000000000..d0e027a6f
--- /dev/null
+++ b/keyboards/tada68/tada68.h
@@ -0,0 +1,43 @@
1#ifndef TADA68_H
2#define TADA68_H
3
4#include "quantum.h"
5
6// readability
7#define XXX KC_NO
8
9/* TADA68 ANSI layout
10 * ,----------------------------------------------------------------.
11 * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | 0e |
12 * |----------------------------------------------------------------|
13 * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | 1e |
14 * |----------------------------------------------------------------|
15 * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d | 2e |
16 * |----------------------------------------------------------------|
17 * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c| 3d| 3e |
18 * |----------------------------------------------------------------|
19 * | 40 | 41 | 42 | 45 | 49| 4a| 4b| 4c| 4d| 4e |
20 * `----------------------------------------------------------------'
21 */
22// The first section contains all of the arguments
23// The second converts the arguments into a two-dimensional array
24
25#define KEYMAP_ANSI( \
26 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
27 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
28 k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \
29 k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \
30 k40, k41, k42, k45, k49, k4a, k4b, k4c, k4d, k4e \
31) \
32{ \
33 {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
34 {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \
35 {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, k2e}, \
36 {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \
37 {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d, k4e} \
38}
39
40void matrix_init_user(void);
41void matrix_scan_user(void);
42
43#endif
diff --git a/quantum/process_keycode/process_tap_dance.c b/quantum/process_keycode/process_tap_dance.c
index 79ade4d00..6ae362c4c 100644
--- a/quantum/process_keycode/process_tap_dance.c
+++ b/quantum/process_keycode/process_tap_dance.c
@@ -70,6 +70,7 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
70 action->state.keycode = keycode; 70 action->state.keycode = keycode;
71 action->state.count++; 71 action->state.count++;
72 action->state.timer = timer_read(); 72 action->state.timer = timer_read();
73 process_tap_dance_action_on_each_tap (action);
73 74
74 if (last_td && last_td != keycode) { 75 if (last_td && last_td != keycode) {
75 qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE]; 76 qk_tap_dance_action_t *paction = &tap_dance_actions[last_td - QK_TAP_DANCE];
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index d7b857bdc..f753cbba6 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -39,15 +39,17 @@ typedef struct
39 39
40#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \ 40#define ACTION_TAP_DANCE_DOUBLE(kc1, kc2) { \
41 .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \ 41 .fn = { NULL, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset }, \
42 .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }) \ 42 .user_data = (void *)&((qk_tap_dance_pair_t) { kc1, kc2 }), \
43 } 43 }
44 44
45#define ACTION_TAP_DANCE_FN(user_fn) { \ 45#define ACTION_TAP_DANCE_FN(user_fn) { \
46 .fn = { NULL, user_fn, NULL } \ 46 .fn = { NULL, user_fn, NULL }, \
47 .user_data = NULL, \
47 } 48 }
48 49
49#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset) { \ 50#define ACTION_TAP_DANCE_FN_ADVANCED(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset) { \
50 .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_reset } \ 51 .fn = { user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset }, \
52 .user_data = NULL, \
51 } 53 }
52 54
53extern qk_tap_dance_action_t tap_dance_actions[]; 55extern qk_tap_dance_action_t tap_dance_actions[];
diff --git a/readme.md b/readme.md
index ea20b5e01..a7320202b 100644
--- a/readme.md
+++ b/readme.md
@@ -526,7 +526,7 @@ This array specifies what actions shall be taken when a tap-dance key is in acti
526 526
527* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held. 527* `ACTION_TAP_DANCE_DOUBLE(kc1, kc2)`: Sends the `kc1` keycode when tapped once, `kc2` otherwise. When the key is held, the appropriate keycode is registered: `kc1` when pressed and held, `kc2` when tapped once, then pressed and held.
528* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action. 528* `ACTION_TAP_DANCE_FN(fn)`: Calls the specified function - defined in the user keymap - with the final tap count of the tap dance action.
529* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets. 529* `ACTION_TAP_DANCE_FN_ADVANCED(on_each_tap_fn, on_dance_finished_fn, on_dance_reset_fn)`: Calls the first specified function - defined in the user keymap - on every tap, the second function on when the dance action finishes (like the previous option), and the last function when the tap dance action resets.
530 530
531The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise. 531The first option is enough for a lot of cases, that just want dual roles. For example, `ACTION_TAP_DANCE(KC_SPC, KC_ENT)` will result in `Space` being sent on single-tap, `Enter` otherwise.
532 532
diff --git a/tmk_core/common/action.c b/tmk_core/common/action.c
index 08ef22eb9..d485b46c7 100644
--- a/tmk_core/common/action.c
+++ b/tmk_core/common/action.c
@@ -155,9 +155,10 @@ void process_action(keyrecord_t *record, action_t action)
155 action.key.mods<<4; 155 action.key.mods<<4;
156 if (event.pressed) { 156 if (event.pressed) {
157 if (mods) { 157 if (mods) {
158 if (IS_MOD(action.key.code)) { 158 if (IS_MOD(action.key.code) || action.key.code == KC_NO) {
159 // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. 159 // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless.
160 // this also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT) 160 // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT).
161 // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO).
161 add_mods(mods); 162 add_mods(mods);
162 } else { 163 } else {
163 add_weak_mods(mods); 164 add_weak_mods(mods);
@@ -168,7 +169,7 @@ void process_action(keyrecord_t *record, action_t action)
168 } else { 169 } else {
169 unregister_code(action.key.code); 170 unregister_code(action.key.code);
170 if (mods) { 171 if (mods) {
171 if (IS_MOD(action.key.code)) { 172 if (IS_MOD(action.key.code) || action.key.code == KC_NO) {
172 del_mods(mods); 173 del_mods(mods);
173 } else { 174 } else {
174 del_weak_mods(mods); 175 del_weak_mods(mods);