aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErez Zukerman <bulk@ezuk.org>2016-10-17 18:12:31 -0400
committerGitHub <noreply@github.com>2016-10-17 18:12:31 -0400
commit0d8844dcb8a3ad89789ea1aea97ff17921d96997 (patch)
tree5cb71165d4620abca617e723eaa445e78eb05998
parent80ac73a21cd08663d015b1fd16f34c6713f875d6 (diff)
parentf9d8cf35f614eb82351b3e5125472ad8c77b1ffa (diff)
downloadqmk_firmware-0d8844dcb8a3ad89789ea1aea97ff17921d96997.tar.gz
qmk_firmware-0d8844dcb8a3ad89789ea1aea97ff17921d96997.zip
Merge pull request #826 from algernon/ergodox-ez/algernon
ergodox: Update algernon's keymap to v1.9
-rw-r--r--keyboards/ergodox/keymaps/algernon/NEWS.md62
-rw-r--r--keyboards/ergodox/keymaps/algernon/images/adore-layer.pngbin97089 -> 97357 bytes
-rw-r--r--keyboards/ergodox/keymaps/algernon/images/base-layer.pngbin102142 -> 102318 bytes
-rw-r--r--keyboards/ergodox/keymaps/algernon/keymap.c192
-rw-r--r--keyboards/ergodox/keymaps/algernon/readme.md8
-rw-r--r--keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json2
-rw-r--r--keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json2
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/hid-commands14
-rwxr-xr-xkeyboards/ergodox/keymaps/algernon/tools/layer-notify12
9 files changed, 189 insertions, 103 deletions
diff --git a/keyboards/ergodox/keymaps/algernon/NEWS.md b/keyboards/ergodox/keymaps/algernon/NEWS.md
index 6b95c1ef4..e11998998 100644
--- a/keyboards/ergodox/keymaps/algernon/NEWS.md
+++ b/keyboards/ergodox/keymaps/algernon/NEWS.md
@@ -1,3 +1,33 @@
1<!-- -*- mode: markdown; fill-column: 8192 -*- -->
2
3## v1.9
4
5*2016-10-16*
6
7### Overall changes
8
9* `F12` was replaced by an `Fx` key, that activate the **Media** layer as a one-shot layer, and also `Alt` as a one-shot modifier.
10
11### Base layer changes
12
13* The `Media Stop` key is now a tap-dance key, and resets the device for programming on the fourth tap.
14
15### Miscellaneous
16
17* `π` can now be entered with UCIS.
18* `🐁` can now be entered with UCIS.
19
20### Tools
21
22* The `tools/layer-notify` tool was removed, it was an example, which I don't use.
23
24#### `tools/hid-commands`
25
26* Now looks at the `DISABLE_APPSEL_START` environment value, and does not display an AppSel notification if it is non-empty.
27* Will attempt to re-program the keyboard when receiving a `reflash` command.
28* No longer tries to select Emacs 24 on `APPSEL_EMACS`, rather, it goes for any Emacs.
29* The `APPSEL_MUSIC` command now includes Kodi in the list too, as the last choice.
30
1## v1.8 31## v1.8
2 32
3*2016-10-03* 33*2016-10-03*
@@ -13,7 +43,7 @@
13 43
14### Miscellaneous 44### Miscellaneous
15 45
16* Fixed the [Steno](#steno-layer) toggle key. 46* Fixed the **Steno** toggle key.
17 47
18## v1.7 48## v1.7
19 49
@@ -21,9 +51,9 @@
21 51
22### Overall changes 52### Overall changes
23 53
24* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers. 54* The number row has been completely rearranged on both the **Base** and the **ADORE** layers.
25* The number/function key behavior was changed: function keys are now on the **Media**. 55* The number/function key behavior was changed: function keys are now on the **Media**.
26* 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. 56* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the **Base** and **ADORE** layers.
27* 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. 57* 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.
28* 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. 58* 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.
29 59
@@ -59,13 +89,13 @@
59### Base layer changes 89### Base layer changes
60 90
61* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. 91* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`.
62* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`. 92* The `:;` and `-_` keys are now available on the base layer, on their **ADORE** location, too, just below `[{(`/`]})`.
63* The `Apps` key has been replaced by `F12`. 93* The `Apps` key has been replaced by `F12`.
64* The `-`/`_` is no longer a tap-dance key. 94* The `-`/`_` is no longer a tap-dance key.
65 95
66### ADORE layer changes 96### ADORE layer changes
67 97
68* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations. 98* Adjustments were made to the **ADORE** layer, to separate some inconvenient combinations.
69 99
70### Miscellaneous changes 100### Miscellaneous changes
71 101
@@ -84,9 +114,9 @@
84 114
85* The **1HAND** layer has been removed. 115* The **1HAND** layer has been removed.
86* A `Delete` key is now available on the right thumb cluster. 116* A `Delete` key is now available on the right thumb cluster.
87* The [ADORE](#adore-layer) layer received a major update, see the layout image above. 117* The **ADORE** layer received a major update, see the layout image above.
88* It is now possible to enable automatic logging for the [ADORE](#adore-layer) layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default. 118* It is now possible to enable automatic logging for the **ADORE** layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default.
89* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer). 119* The `~` key and the `Media Next/Prev` key have been swapped on the **Base** layer.
90* On the **ARROW** layer, `Backspace` has been replaced by `Enter`. 120* On the **ARROW** layer, `Backspace` has been replaced by `Enter`.
91* There is some experimental support for entering Unicode symbols. 121* There is some experimental support for entering Unicode symbols.
92 122
@@ -104,33 +134,33 @@
104 134
105*2016-07-06* 135*2016-07-06*
106 136
107* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs. 137* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a *heatmap* out of the logs.
108* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are. 138* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the **Base** layer for an image that shows where arrows are.
109* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now. 139* The **experimental** layer has been redone, and is now called **ADORE**, and as such, can be enabled by `LEAD a` now.
110* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot. 140* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot.
111 141
112## v1.2 142## v1.2
113 143
114*2016-06-22* 144*2016-06-22*
115 145
116* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows). 146* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with certain operating systems.
117* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. 147* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted.
118* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers. 148* The `=` and `\` keys were swapped, `=` moved to the home row, on both the **Base** and the **experimental** layers.
119* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access. 149* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access.
120* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer. 150* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer.
121* `LEAD v` types the firmware version, and the keymap version. 151* `LEAD v` types the firmware version, and the keymap version.
122* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped. 152* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped.
123* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers. 153* The **Steno** layer gained a few more `#` and `*` keys, to make it easier on my fingers.
124 154
125## v1.1 155## v1.1
126 156
127*2016-06-14* 157*2016-06-14*
128 158
129* The keyboard starts in NKRO mode, bootmagic and other things are disabled. 159* The keyboard starts in NKRO mode, bootmagic and other things are disabled.
130* A [Steno](#steno-layer) layer was added, to be used with Plover. 160* A **Steno** layer was added, to be used with Plover.
131* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress. 161* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress.
132* `LEAD y` types `\o/`. 162* `LEAD y` types `\o/`.
133* Some keys on the [Base](#base-layer) layer have been moved around: 163* Some keys on the **Base** layer have been moved around:
134 - `?` moved to the left pinky, left of `Q`. 164 - `?` moved to the left pinky, left of `Q`.
135 - `=` shifted one row down, but `F11` stayed where it was. 165 - `=` shifted one row down, but `F11` stayed where it was.
136 - `-` on the left half was replaced by `Tab`. 166 - `-` on the left half was replaced by `Tab`.
diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png
index 5f39010bb..f6c64ca64 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 2a981a470..5bd0611f6 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/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c
index 48d63fb0b..bad240337 100644
--- a/keyboards/ergodox/keymaps/algernon/keymap.c
+++ b/keyboards/ergodox/keymaps/algernon/keymap.c
@@ -64,6 +64,9 @@ enum {
64 A_8, 64 A_8,
65 A_9, 65 A_9,
66 A_0, 66 A_0,
67
68 // Fx
69 Fx,
67}; 70};
68 71
69/* Fn keys */ 72/* Fn keys */
@@ -86,6 +89,7 @@ enum {
86 CT_RBP, 89 CT_RBP,
87 CT_TMUX, 90 CT_TMUX,
88 CT_TPS, 91 CT_TPS,
92 CT_SR,
89}; 93};
90 94
91/* States & timers */ 95/* States & timers */
@@ -103,6 +107,7 @@ bool log_enable = false;
103#endif 107#endif
104 108
105bool time_travel = false; 109bool time_travel = false;
110bool skip_leds = false;
106 111
107static uint8_t is_adore = 0; 112static uint8_t is_adore = 0;
108 113
@@ -113,13 +118,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
113/* Keymap 0: Base Layer 118/* Keymap 0: Base Layer
114 * 119 *
115 * ,-----------------------------------------------------. ,-----------------------------------------------------. 120 * ,-----------------------------------------------------. ,-----------------------------------------------------.
116 * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | 121 * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | Fx | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
117 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 122 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
118 * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ | 123 * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ |
119 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| 124 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
120 * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | 125 * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow |
121 * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| 126 * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------|
122 * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop | 127 * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop/Reset|
123 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' 128 * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------'
124 * | | | | | : | | - | | | | | 129 * | | | | | : | | - | | | | |
125 * `-----------------------------------' `-----------------------------------' 130 * `-----------------------------------' `-----------------------------------'
@@ -144,10 +149,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
144 ,KC_BSPC,F(F_SFT),KC_ESC 149 ,KC_BSPC,F(F_SFT),KC_ESC
145 150
146 // right hand 151 // right hand
147 ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) 152 ,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
148 ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS 153 ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS
149 ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL 154 ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL
150 ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP 155 ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,TD(CT_SR)
151 ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO 156 ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO
152 157
153 ,OSL(NMDIA),KC_DEL 158 ,OSL(NMDIA),KC_DEL
@@ -158,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
158/* Keymap 1: Adore layer 163/* Keymap 1: Adore layer
159 * 164 *
160 * ,-----------------------------------------------------. ,-----------------------------------------------------. 165 * ,-----------------------------------------------------. ,-----------------------------------------------------.
161 * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | 166 * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | Fx | 0 % | 2 ! | 4 # | 6 & | 8 | Plover |
162 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 167 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
163 * | \ | X | W | C | H | F | ( | | ) | M | G | L | P | / | `~ | 168 * | \ | X | W | C | H | F | ( | | ) | M | G | L | P | / | `~ |
164 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| 169 * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------|
@@ -189,7 +194,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
189 ,KC_BSPC,F(F_SFT),KC_ESC 194 ,KC_BSPC,F(F_SFT),KC_ESC
190 195
191 // right hand 196 // right hand
192 ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) 197 ,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR)
193 ,TD(CT_RBP),KC_M ,KC_G ,KC_L ,KC_P ,KC_SLSH ,KC_GRV 198 ,TD(CT_RBP),KC_M ,KC_G ,KC_L ,KC_P ,KC_SLSH ,KC_GRV
194 ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL 199 ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL
195 ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_Y ,KC_J ,KC_NO 200 ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_Y ,KC_J ,KC_NO
@@ -342,7 +347,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
342/* Keymap 5: Navigation & Media layer 347/* Keymap 5: Navigation & Media layer
343 * 348 *
344 * ,-----------------------------------------------------. ,-----------------------------------------------------. 349 * ,-----------------------------------------------------. ,-----------------------------------------------------.
345 * | | F9 | F7 | F5 | F3 | F1 | | |ScrLCK| F10 | F2 | F4 | F6 | F8 | | 350 * | | F9 | F7 | F5 | F3 | F1 |ScrLCK| | | F10 | F2 | F4 | F6 | F8 | |
346 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| 351 * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
347 * | | | | | | | | | | | | | | | | 352 * | | | | | | | | | | | | | | | |
348 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| 353 * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
@@ -362,7 +367,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
362 */ 367 */
363[NMDIA] = KEYMAP( 368[NMDIA] = KEYMAP(
364// left hand 369// left hand
365 KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,KC_NO 370 KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,LGUI(KC_L)
366,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 371,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
367,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 372,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
368,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 373,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
@@ -372,7 +377,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
372 ,KC_NO ,KC_NO ,KC_TRNS 377 ,KC_NO ,KC_NO ,KC_TRNS
373 378
374 // right hand 379 // right hand
375 ,LGUI(KC_L),KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO 380 ,KC_TRNS ,KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO
376 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 381 ,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 ,KC_NO 382 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
378 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO 383 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO
@@ -611,6 +616,17 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
611 toggle_steno(record->event.pressed); 616 toggle_steno(record->event.pressed);
612 break; 617 break;
613 618
619 /* Fx */
620 case Fx:
621 if (record->event.pressed) {
622 set_oneshot_mods (MOD_LALT);
623 layer_on (NMDIA);
624 set_oneshot_layer (NMDIA, ONESHOT_START);
625 } else {
626 clear_oneshot_layer_state (ONESHOT_PRESSED);
627 }
628 break;
629
614 /* GUI & AppSel */ 630 /* GUI & AppSel */
615 case A_GUI: 631 case A_GUI:
616 if (record->event.pressed) { 632 if (record->event.pressed) {
@@ -780,6 +796,56 @@ static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *u
780 unregister_code(kc); 796 unregister_code(kc);
781} 797}
782 798
799static void
800_td_sr_each (qk_tap_dance_state_t *state, void *user_data) {
801 skip_leds = true;
802
803 switch (state->count) {
804 case 1:
805 ergodox_right_led_3_on ();
806 break;
807 case 2:
808 ergodox_right_led_2_on ();
809 break;
810 case 3:
811 ergodox_right_led_1_on ();
812 break;
813 case 4:
814 ergodox_right_led_3_off ();
815 wait_ms (50);
816 ergodox_right_led_2_off ();
817 wait_ms (50);
818 ergodox_right_led_1_off ();
819 break;
820 }
821}
822
823static void
824_td_sr_finished (qk_tap_dance_state_t *state, void *user_data) {
825 if (state->count == 1) {
826 register_code (KC_MSTP);
827 }
828 if (state->count >= 4) {
829 uprintf("CMD:reflash\n");
830 wait_ms (1000);
831 reset_keyboard ();
832 reset_tap_dance (state);
833 }
834}
835
836static void
837_td_sr_reset (qk_tap_dance_state_t *state, void *user_data) {
838 ergodox_right_led_1_off ();
839 wait_ms (50);
840 ergodox_right_led_2_off ();
841 wait_ms (50);
842 ergodox_right_led_3_off ();
843
844 if (state->count == 1) {
845 unregister_code (KC_MSTP);
846 }
847}
848
783qk_tap_dance_action_t tap_dance_actions[] = { 849qk_tap_dance_action_t tap_dance_actions[] = {
784 [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN) 850 [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN)
785 ,[CT_TA] = { 851 ,[CT_TA] = {
@@ -790,77 +856,75 @@ qk_tap_dance_action_t tap_dance_actions[] = {
790 ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN) 856 ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN)
791 ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished) 857 ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished)
792 ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select) 858 ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select)
859 ,[CT_SR] = ACTION_TAP_DANCE_FN_ADVANCED (_td_sr_each, _td_sr_finished, _td_sr_reset)
793}; 860};
794 861
795// Runs constantly in the background, in a loop. 862// Runs constantly in the background, in a loop.
796void matrix_scan_user(void) { 863void matrix_scan_user(void) {
797 static uint32_t prev_layer_state;
798 uint8_t layer = biton32(layer_state); 864 uint8_t layer = biton32(layer_state);
799 bool is_arrow = false; 865 bool is_arrow = false;
800 static char *layer_lookup[] = {"Dvorak", "ADORE", "Arrows", "AppSel", "Hungarian", "Nav/Media", "Plover"};
801
802 if (layer_state != prev_layer_state) {
803 prev_layer_state = layer_state;
804 if (layer_lookup[layer])
805 uprintf("LAYER: %s\n", layer_lookup[layer]);
806 }
807
808 866
809 if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) 867 if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
810 unregister_code (KC_LGUI); 868 unregister_code (KC_LGUI);
811 869
812 if (layer == HUN) { 870 if (!skip_leds) {
813 ergodox_right_led_2_on(); 871 if (layer == HUN) {
814 ergodox_right_led_3_on(); 872 ergodox_right_led_2_on();
815 } else if (layer == NMDIA) { 873 ergodox_right_led_3_on();
816 ergodox_right_led_1_on(); 874 } else if (layer == NMDIA) {
817 ergodox_right_led_2_on(); 875 ergodox_right_led_1_on();
818 } else if (layer == PLVR) { 876 ergodox_right_led_2_on();
819 ergodox_right_led_1_on (); 877 } else if (layer == PLVR) {
820 ergodox_right_led_2_on (); 878 ergodox_right_led_1_on ();
821 ergodox_right_led_3_on (); 879 ergodox_right_led_2_on ();
822 } else if (layer == ADORE) { 880 ergodox_right_led_3_on ();
823 ergodox_right_led_1_on (); 881 } else if (layer == ADORE) {
824 ergodox_right_led_2_on (); 882 ergodox_right_led_1_on ();
825 ergodox_right_led_3_on (); 883 ergodox_right_led_2_on ();
826 884 ergodox_right_led_3_on ();
827 ergodox_right_led_2_set (LED_BRIGHTNESS_HI); 885
886 ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
887 }
828 } 888 }
829 889
830 if (layer_state & (1UL << ARRW)) { 890 if (layer_state & (1UL << ARRW)) {
831 ergodox_right_led_1_on (); 891 if (!skip_leds) {
832 ergodox_right_led_3_on (); 892 ergodox_right_led_1_on ();
893 ergodox_right_led_3_on ();
894 }
833 is_arrow = true; 895 is_arrow = true;
834 } 896 }
835 897
836 if (keyboard_report->mods & MOD_BIT(KC_LSFT) || 898 if (!skip_leds) {
837 ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { 899 if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
838 ergodox_right_led_1_set (LED_BRIGHTNESS_HI); 900 ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
839 ergodox_right_led_1_on (); 901 ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
840 } else { 902 ergodox_right_led_1_on ();
841 ergodox_right_led_1_set (LED_BRIGHTNESS_LO); 903 } else {
842 if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow) 904 ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
843 ergodox_right_led_1_off (); 905 if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow)
844 } 906 ergodox_right_led_1_off ();
907 }
845 908
846 if (keyboard_report->mods & MOD_BIT(KC_LALT) || 909 if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
847 ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) { 910 ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) {
848 ergodox_right_led_2_set (LED_BRIGHTNESS_HI); 911 ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
849 ergodox_right_led_2_on (); 912 ergodox_right_led_2_on ();
850 } else { 913 } else {
851 ergodox_right_led_2_set (LED_BRIGHTNESS_LO); 914 ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
852 if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE) 915 if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE)
853 ergodox_right_led_2_off (); 916 ergodox_right_led_2_off ();
854 } 917 }
855 918
856 if (keyboard_report->mods & MOD_BIT(KC_LCTRL) || 919 if (keyboard_report->mods & MOD_BIT(KC_LCTRL) ||
857 ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) { 920 ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) {
858 ergodox_right_led_3_set (LED_BRIGHTNESS_HI); 921 ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
859 ergodox_right_led_3_on (); 922 ergodox_right_led_3_on ();
860 } else { 923 } else {
861 ergodox_right_led_3_set (LED_BRIGHTNESS_LO); 924 ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
862 if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow) 925 if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow)
863 ergodox_right_led_3_off (); 926 ergodox_right_led_3_off ();
927 }
864 } 928 }
865 929
866 LEADER_DICTIONARY() { 930 LEADER_DICTIONARY() {
@@ -974,7 +1038,9 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
974 UCIS_SYM("snowman", 0x2603), 1038 UCIS_SYM("snowman", 0x2603),
975 UCIS_SYM("coffee", 0x2615), 1039 UCIS_SYM("coffee", 0x2615),
976 UCIS_SYM("heart", 0x2764), 1040 UCIS_SYM("heart", 0x2764),
977 UCIS_SYM("bolt", 0x26a1) 1041 UCIS_SYM("bolt", 0x26a1),
1042 UCIS_SYM("pi", 0x03c0),
1043 UCIS_SYM("mouse", 0x1f401)
978); 1044);
979 1045
980bool process_record_user (uint16_t keycode, keyrecord_t *record) { 1046bool process_record_user (uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md
index 822ca3650..015bd7cd3 100644
--- a/keyboards/ergodox/keymaps/algernon/readme.md
+++ b/keyboards/ergodox/keymaps/algernon/readme.md
@@ -43,6 +43,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest
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. 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.
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. 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.
45* The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle. 45* The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle.
46* The **Fx** key is one-shot, and activates the **Media** layer, along with a one-shot `Alt`.
46* When holding the `Tab`/**Arrow** key, the arrow layer activates while the key is held. Tapping the key produces the normal, `Tab` key. Double-tapping it toggles the **Arrow** layer on until a third tap. 47* When holding the `Tab`/**Arrow** key, the arrow layer activates while the key is held. Tapping the key produces the normal, `Tab` key. Double-tapping it toggles the **Arrow** layer on until a third tap.
47* Tapping the `:` key once yields `:`, tapping it twice yields `;`. 48* Tapping the `:` key once yields `:`, tapping it twice yields `;`.
48* Tapping the `[{(`/`)}]` keys once yields `[` (or `{` when shifted), tapping them twice yields `(`. 49* Tapping the `[{(`/`)}]` keys once yields `[` (or `{` when shifted), tapping them twice yields `(`.
@@ -93,12 +94,7 @@ Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers
93 94
94Once in the Unicode Symbol Input mode, one is able to type in symbol names, press `Enter` or `Space`, and get the Unicode symbol itself back. When in the mode, a capital `U` is printed first. Once the sequence is finished, all of it is erased by sending enough `Backspace` taps, and the firmware starts the OS-specific unicode input sequence. Then, it looks up the symbol name, and enters the associated code. If it is not found, it will just replay the pressed keycodes. 95Once in the Unicode Symbol Input mode, one is able to type in symbol names, press `Enter` or `Space`, and get the Unicode symbol itself back. When in the mode, a capital `U` is printed first. Once the sequence is finished, all of it is erased by sending enough `Backspace` taps, and the firmware starts the OS-specific unicode input sequence. Then, it looks up the symbol name, and enters the associated code. If it is not found, it will just replay the pressed keycodes.
95 96
96The currently supported symbols are: 97For the list of supported symbols, please see the source.
97
98- `snowman`: ☃
99- `kiss`: 😙
100- `rofl`: 🤣
101- `poop`: 💩
102 98
103This is an experimental feature, and may or may not work reliably. 99This is an experimental feature, and may or may not work reliably.
104 100
diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
index a34edcf87..e09efecc4 100644
--- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
+++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json
@@ -65,7 +65,7 @@
65 "x": 4.5, 65 "x": 4.5,
66 "f": 3 66 "f": 3
67 }, 67 },
68 "F12", 68 "Fx",
69 { 69 {
70 "a": 4, 70 "a": 4,
71 "f": 3, 71 "f": 3,
diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json
index 5b4ca06c3..1e53281c5 100644
--- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json
+++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json
@@ -65,7 +65,7 @@
65 "x": 4.5, 65 "x": 4.5,
66 "f": 3 66 "f": 3
67 }, 67 },
68 "F12", 68 "Fx",
69 { 69 {
70 "a": 4, 70 "a": 4,
71 "f": 3, 71 "f": 3,
diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands
index 2a6710be4..a29d38f41 100755
--- a/keyboards/ergodox/keymaps/algernon/tools/hid-commands
+++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands
@@ -16,7 +16,7 @@ _cmd_appsel () {
16} 16}
17 17
18cmd_appsel_music () { 18cmd_appsel_music () {
19 wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true 19 wmctrl -x -a rhythmbox || wmctrl -x -a spotify || wmctrl -x -a kodi || true
20 xdotool key Escape 20 xdotool key Escape
21} 21}
22 22
@@ -25,7 +25,7 @@ cmd_appsel_slack () {
25} 25}
26 26
27cmd_appsel_emacs () { 27cmd_appsel_emacs () {
28 _cmd_appsel emacs24 28 _cmd_appsel emacs
29} 29}
30 30
31cmd_appsel_term () { 31cmd_appsel_term () {
@@ -37,6 +37,10 @@ cmd_appsel_chrome () {
37} 37}
38 38
39cmd_appsel_start () { 39cmd_appsel_start () {
40 if [ ! -z "${DISABLE_APPSEL_START}" ]; then
41 return
42 fi
43
40 APPSEL_START=$(date +%s) 44 APPSEL_START=$(date +%s)
41 if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then 45 if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then
42 return 46 return
@@ -46,6 +50,10 @@ cmd_appsel_start () {
46 -i /usr/share/icons/Adwaita/24x24/devices/video-display.png 50 -i /usr/share/icons/Adwaita/24x24/devices/video-display.png
47} 51}
48 52
53cmd_reflash () {
54 teensy_loader_cli -v -w ~/src/ext/qmk_firmware/algernon.hex --mcu atmega32u4 || true
55}
56
49cmd_help () { 57cmd_help () {
50 cat <<EOF 58 cat <<EOF
51Use the source, Luke! 59Use the source, Luke!
@@ -69,5 +77,3 @@ while read l; do
69 cmd_${cmd} 77 cmd_${cmd}
70 fi 78 fi
71done 79done
72
73
diff --git a/keyboards/ergodox/keymaps/algernon/tools/layer-notify b/keyboards/ergodox/keymaps/algernon/tools/layer-notify
deleted file mode 100755
index 627c2861e..000000000
--- a/keyboards/ergodox/keymaps/algernon/tools/layer-notify
+++ /dev/null
@@ -1,12 +0,0 @@
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)