Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
This commit is contained in:
		
						commit
						b466628c0b
					
				
					 9 changed files with 188 additions and 102 deletions
				
			
		| 
						 | 
				
			
			@ -1,3 +1,33 @@
 | 
			
		|||
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
 | 
			
		||||
 | 
			
		||||
## v1.9
 | 
			
		||||
 | 
			
		||||
*2016-10-16*
 | 
			
		||||
 | 
			
		||||
### Overall changes
 | 
			
		||||
 | 
			
		||||
* `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.
 | 
			
		||||
 | 
			
		||||
### Base layer changes
 | 
			
		||||
 | 
			
		||||
* The `Media Stop` key is now a tap-dance key, and resets the device for programming on the fourth tap.
 | 
			
		||||
 | 
			
		||||
### Miscellaneous
 | 
			
		||||
 | 
			
		||||
* `π` can now be entered with UCIS.
 | 
			
		||||
* `🐁` can now be entered with UCIS.
 | 
			
		||||
 | 
			
		||||
### Tools
 | 
			
		||||
 | 
			
		||||
* The `tools/layer-notify` tool was removed, it was an example, which I don't use.
 | 
			
		||||
 | 
			
		||||
#### `tools/hid-commands`
 | 
			
		||||
 | 
			
		||||
* Now looks at the `DISABLE_APPSEL_START` environment value, and does not display an AppSel notification if it is non-empty.
 | 
			
		||||
* Will attempt to re-program the keyboard when receiving a `reflash` command.
 | 
			
		||||
* No longer tries to select Emacs 24 on `APPSEL_EMACS`, rather, it goes for any Emacs.
 | 
			
		||||
* The `APPSEL_MUSIC` command now includes Kodi in the list too, as the last choice.
 | 
			
		||||
 | 
			
		||||
## v1.8
 | 
			
		||||
 | 
			
		||||
*2016-10-03*
 | 
			
		||||
| 
						 | 
				
			
			@ -13,7 +43,7 @@
 | 
			
		|||
 | 
			
		||||
### Miscellaneous
 | 
			
		||||
 | 
			
		||||
* Fixed the [Steno](#steno-layer) toggle key.
 | 
			
		||||
* Fixed the **Steno** toggle key.
 | 
			
		||||
 | 
			
		||||
## v1.7
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -21,9 +51,9 @@
 | 
			
		|||
 | 
			
		||||
### Overall changes
 | 
			
		||||
 | 
			
		||||
* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers.
 | 
			
		||||
* The number row has been completely rearranged on both the **Base** and the **ADORE** layers.
 | 
			
		||||
* The number/function key behavior was changed: function keys are now on the **Media**.
 | 
			
		||||
* 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.
 | 
			
		||||
* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the **Base** and **ADORE** layers.
 | 
			
		||||
* 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.
 | 
			
		||||
* 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.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -59,13 +89,13 @@
 | 
			
		|||
### Base layer changes
 | 
			
		||||
 | 
			
		||||
* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`.
 | 
			
		||||
* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`.
 | 
			
		||||
* The `:;` and `-_` keys are now available on the base layer, on their **ADORE** location, too, just below `[{(`/`]})`.
 | 
			
		||||
* The `Apps` key has been replaced by `F12`.
 | 
			
		||||
* The `-`/`_` is no longer a tap-dance key.
 | 
			
		||||
 | 
			
		||||
### ADORE layer changes
 | 
			
		||||
 | 
			
		||||
* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations.
 | 
			
		||||
* Adjustments were made to the **ADORE** layer, to separate some inconvenient combinations.
 | 
			
		||||
 | 
			
		||||
### Miscellaneous changes
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -84,9 +114,9 @@
 | 
			
		|||
 | 
			
		||||
* The **1HAND** layer has been removed.
 | 
			
		||||
* A `Delete` key is now available on the right thumb cluster.
 | 
			
		||||
* The [ADORE](#adore-layer) layer received a major update, see the layout image above.
 | 
			
		||||
* 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.
 | 
			
		||||
* The `~` key and the `Media Next/Prev` key have been swapped on the [base layer](#base-layer).
 | 
			
		||||
* The **ADORE** layer received a major update, see the layout image above.
 | 
			
		||||
* 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.
 | 
			
		||||
* The `~` key and the `Media Next/Prev` key have been swapped on the **Base** layer.
 | 
			
		||||
* On the **ARROW** layer, `Backspace` has been replaced by `Enter`.
 | 
			
		||||
* There is some experimental support for entering Unicode symbols.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -104,33 +134,33 @@
 | 
			
		|||
 | 
			
		||||
*2016-07-06*
 | 
			
		||||
 | 
			
		||||
* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs.
 | 
			
		||||
* 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.
 | 
			
		||||
* The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now.
 | 
			
		||||
* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a *heatmap* out of the logs.
 | 
			
		||||
* 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.
 | 
			
		||||
* The **experimental** layer has been redone, and is now called **ADORE**, and as such, can be enabled by `LEAD a` now.
 | 
			
		||||
* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot.
 | 
			
		||||
 | 
			
		||||
## v1.2
 | 
			
		||||
 | 
			
		||||
*2016-06-22*
 | 
			
		||||
 | 
			
		||||
* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows).
 | 
			
		||||
* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with certain operating systems.
 | 
			
		||||
* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted.
 | 
			
		||||
* The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers.
 | 
			
		||||
* The `=` and `\` keys were swapped, `=` moved to the home row, on both the **Base** and the **experimental** layers.
 | 
			
		||||
* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access.
 | 
			
		||||
* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer.
 | 
			
		||||
* `LEAD v` types the firmware version, and the keymap version.
 | 
			
		||||
* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped.
 | 
			
		||||
* The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers.
 | 
			
		||||
* The **Steno** layer gained a few more `#` and `*` keys, to make it easier on my fingers.
 | 
			
		||||
 | 
			
		||||
## v1.1
 | 
			
		||||
 | 
			
		||||
*2016-06-14*
 | 
			
		||||
 | 
			
		||||
* The keyboard starts in NKRO mode, bootmagic and other things are disabled.
 | 
			
		||||
* A [Steno](#steno-layer) layer was added, to be used with Plover.
 | 
			
		||||
* A **Steno** layer was added, to be used with Plover.
 | 
			
		||||
* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress.
 | 
			
		||||
* `LEAD y` types `\o/`.
 | 
			
		||||
* Some keys on the [Base](#base-layer) layer have been moved around:
 | 
			
		||||
* Some keys on the **Base** layer have been moved around:
 | 
			
		||||
    - `?` moved to the left pinky, left of `Q`.
 | 
			
		||||
    - `=` shifted one row down, but `F11` stayed where it was.
 | 
			
		||||
    - `-` on the left half was replaced by `Tab`.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB  | 
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB  | 
| 
						 | 
				
			
			@ -64,6 +64,9 @@ enum {
 | 
			
		|||
  A_8,
 | 
			
		||||
  A_9,
 | 
			
		||||
  A_0,
 | 
			
		||||
 | 
			
		||||
  // Fx
 | 
			
		||||
  Fx,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* Fn keys */
 | 
			
		||||
| 
						 | 
				
			
			@ -86,6 +89,7 @@ enum {
 | 
			
		|||
  CT_RBP,
 | 
			
		||||
  CT_TMUX,
 | 
			
		||||
  CT_TPS,
 | 
			
		||||
  CT_SR,
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/* States & timers */
 | 
			
		||||
| 
						 | 
				
			
			@ -103,6 +107,7 @@ bool log_enable = false;
 | 
			
		|||
#endif
 | 
			
		||||
 | 
			
		||||
bool time_travel = false;
 | 
			
		||||
bool skip_leds = false;
 | 
			
		||||
 | 
			
		||||
static uint8_t is_adore = 0;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -113,13 +118,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
/* Keymap 0: Base Layer
 | 
			
		||||
 *
 | 
			
		||||
 * ,-----------------------------------------------------.           ,-----------------------------------------------------.
 | 
			
		||||
 * | Next/Prev | 9    | 7  @ | 5  * | 3  ^ | 1  $ | F11  |           |  F12 | 0  % | 2  ! | 4  # | 6  & | 8    |    Plover |
 | 
			
		||||
 * | Next/Prev | 9    | 7  @ | 5  * | 3  ^ | 1  $ | F11  |           |  Fx  | 0  % | 2  ! | 4  # | 6  & | 8    |    Plover |
 | 
			
		||||
 * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
 | 
			
		||||
 * |         ~ |   '  |   ,  |   .  |   P  |   Y  |   (  |           |  )   |   F  |   G  |   C  |   R  |  L   | \         |
 | 
			
		||||
 * |-----------+------+------+------+------+------|   [  |           |  ]   |------+------+------+------+------+-----------|
 | 
			
		||||
 * | Tab/ARROW |   A  |   O  |   E  |   U  |   I  |------|           |------|   D  |   H  |   T  |   N  |  S   | = / Arrow |
 | 
			
		||||
 * |-----------+------+------+------+------+------| tmux |           | tmux |------+------+------+------+------+-----------|
 | 
			
		||||
 * | Play/Pause|   /  |   Q  |   J  |   K  |   X  |      |           | Pane |   B  |   M  |   W  |   V  |  Z   |      Stop |
 | 
			
		||||
 * | Play/Pause|   /  |   Q  |   J  |   K  |   X  |      |           | Pane |   B  |   M  |   W  |   V  |  Z   | Stop/Reset|
 | 
			
		||||
 * `-----------+------+------+------+------+-------------'           `-------------+------+------+------+------+-----------'
 | 
			
		||||
 *     |       |      |      |      |   :  |                                       |   -  |      |      |      |       |
 | 
			
		||||
 *     `-----------------------------------'                                       `-----------------------------------'
 | 
			
		||||
| 
						 | 
				
			
			@ -144,10 +149,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
                                                    ,KC_BSPC,F(F_SFT),KC_ESC
 | 
			
		||||
 | 
			
		||||
                                                                // right hand
 | 
			
		||||
                                                               ,KC_F12    ,M(A_0)  ,M(A_2)    ,M(A_4)  ,M(A_6)  ,M(A_8)   ,M(A_PLVR)
 | 
			
		||||
                                                               ,M(Fx)     ,M(A_0)  ,M(A_2)    ,M(A_4)  ,M(A_6)  ,M(A_8)   ,M(A_PLVR)
 | 
			
		||||
                                                               ,TD(CT_RBP),KC_F    ,KC_G      ,KC_C    ,KC_R    ,KC_L     ,KC_BSLS
 | 
			
		||||
                                                                          ,KC_D    ,KC_H      ,KC_T    ,KC_N    ,KC_S     ,KC_EQL
 | 
			
		||||
                                                               ,TD(CT_TPS),KC_B    ,KC_M      ,KC_W    ,KC_V    ,KC_Z     ,KC_MSTP
 | 
			
		||||
                                                               ,TD(CT_TPS),KC_B    ,KC_M      ,KC_W    ,KC_V    ,KC_Z     ,TD(CT_SR)
 | 
			
		||||
                                                                                   ,KC_MINS   ,KC_NO   ,KC_NO   ,KC_NO    ,KC_NO
 | 
			
		||||
 | 
			
		||||
                                                               ,OSL(NMDIA),KC_DEL
 | 
			
		||||
| 
						 | 
				
			
			@ -158,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
/* Keymap 1: Adore layer
 | 
			
		||||
 *
 | 
			
		||||
 * ,-----------------------------------------------------.           ,-----------------------------------------------------.
 | 
			
		||||
 * | Play/Pause| 9    | 7  @ | 5  * | 3  ^ | 1  $ | F11  |           |  F12 | 0  % | 2  ! | 4  # | 6  & | 8    |    Plover |
 | 
			
		||||
 * | Play/Pause| 9    | 7  @ | 5  * | 3  ^ | 1  $ | F11  |           |  Fx  | 0  % | 2  ! | 4  # | 6  & | 8    |    Plover |
 | 
			
		||||
 * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
 | 
			
		||||
 * |         \ |   X  |   W  |   C  |   H  |   F  |   (  |           |  )   |   M  |   G  |   L  |   P  |  /   | `~        |
 | 
			
		||||
 * |-----------+------+------+------+------+------|   [  |           |  ]   |------+------+------+------+------+-----------|
 | 
			
		||||
| 
						 | 
				
			
			@ -189,7 +194,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
                                                    ,KC_BSPC,F(F_SFT),KC_ESC
 | 
			
		||||
 | 
			
		||||
                                                                // right hand
 | 
			
		||||
                                                               ,KC_F12    ,M(A_0)   ,M(A_2)  ,M(A_4)  ,M(A_6)  ,M(A_8)  ,M(A_PLVR)
 | 
			
		||||
                                                               ,M(Fx)     ,M(A_0)   ,M(A_2)  ,M(A_4)  ,M(A_6)  ,M(A_8)  ,M(A_PLVR)
 | 
			
		||||
                                                               ,TD(CT_RBP),KC_M     ,KC_G    ,KC_L    ,KC_P    ,KC_SLSH ,KC_GRV
 | 
			
		||||
                                                                          ,KC_D     ,KC_R    ,KC_T    ,KC_N    ,KC_S    ,KC_EQL
 | 
			
		||||
                                                               ,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] = {
 | 
			
		|||
/* Keymap 5: Navigation & Media layer
 | 
			
		||||
 *
 | 
			
		||||
 * ,-----------------------------------------------------.           ,-----------------------------------------------------.
 | 
			
		||||
 * |           |  F9  |  F7  |  F5  |  F3  |  F1  |      |           |ScrLCK| F10  |  F2  |  F4  |  F6  |  F8  |           |
 | 
			
		||||
 * |           |  F9  |  F7  |  F5  |  F3  |  F1  |ScrLCK|           |      | F10  |  F2  |  F4  |  F6  |  F8  |           |
 | 
			
		||||
 * |-----------+------+------+------+------+-------------|           |------+------+------+------+------+------+-----------|
 | 
			
		||||
 * |           |      |      |      |      |      |      |           |      |      |      |      |      |      |           |
 | 
			
		||||
 * |-----------+------+------+------+------+------|      |           |      |------+------+------+------+------+-----------|
 | 
			
		||||
| 
						 | 
				
			
			@ -362,7 +367,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
 | 
			
		|||
 */
 | 
			
		||||
[NMDIA] = KEYMAP(
 | 
			
		||||
// left hand
 | 
			
		||||
 KC_NO      ,KC_F9       ,KC_F7      ,KC_F5   ,KC_F3   ,KC_F1   ,KC_NO
 | 
			
		||||
 KC_NO      ,KC_F9       ,KC_F7      ,KC_F5   ,KC_F3   ,KC_F1   ,LGUI(KC_L)
 | 
			
		||||
,KC_NO      ,KC_NO       ,KC_NO      ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO
 | 
			
		||||
,KC_NO      ,KC_NO       ,KC_NO      ,KC_NO   ,KC_NO   ,KC_NO
 | 
			
		||||
,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] = {
 | 
			
		|||
                                                 ,KC_NO ,KC_NO   ,KC_TRNS
 | 
			
		||||
 | 
			
		||||
                                                                     // right hand
 | 
			
		||||
                                                                     ,LGUI(KC_L),KC_F10  ,KC_F2   ,KC_F4   ,KC_F6   ,KC_F8    ,KC_NO
 | 
			
		||||
                                                                     ,KC_TRNS   ,KC_F10  ,KC_F2   ,KC_F4   ,KC_F6   ,KC_F8    ,KC_NO
 | 
			
		||||
                                                                     ,KC_NO     ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO    ,KC_NO
 | 
			
		||||
                                                                                ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO   ,KC_NO    ,KC_NO
 | 
			
		||||
                                                                     ,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)
 | 
			
		|||
        toggle_steno(record->event.pressed);
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
        /* Fx */
 | 
			
		||||
      case Fx:
 | 
			
		||||
        if (record->event.pressed) {
 | 
			
		||||
          set_oneshot_mods (MOD_LALT);
 | 
			
		||||
          layer_on (NMDIA);
 | 
			
		||||
          set_oneshot_layer (NMDIA, ONESHOT_START);
 | 
			
		||||
        } else {
 | 
			
		||||
          clear_oneshot_layer_state (ONESHOT_PRESSED);
 | 
			
		||||
        }
 | 
			
		||||
        break;
 | 
			
		||||
 | 
			
		||||
        /* GUI & AppSel */
 | 
			
		||||
      case A_GUI:
 | 
			
		||||
        if (record->event.pressed) {
 | 
			
		||||
| 
						 | 
				
			
			@ -780,6 +796,56 @@ static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *u
 | 
			
		|||
  unregister_code(kc);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
_td_sr_each (qk_tap_dance_state_t *state, void *user_data) {
 | 
			
		||||
  skip_leds = true;
 | 
			
		||||
 | 
			
		||||
  switch (state->count) {
 | 
			
		||||
  case 1:
 | 
			
		||||
    ergodox_right_led_3_on ();
 | 
			
		||||
    break;
 | 
			
		||||
  case 2:
 | 
			
		||||
    ergodox_right_led_2_on ();
 | 
			
		||||
    break;
 | 
			
		||||
  case 3:
 | 
			
		||||
    ergodox_right_led_1_on ();
 | 
			
		||||
    break;
 | 
			
		||||
  case 4:
 | 
			
		||||
    ergodox_right_led_3_off ();
 | 
			
		||||
    wait_ms (50);
 | 
			
		||||
    ergodox_right_led_2_off ();
 | 
			
		||||
    wait_ms (50);
 | 
			
		||||
    ergodox_right_led_1_off ();
 | 
			
		||||
    break;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
_td_sr_finished (qk_tap_dance_state_t *state, void *user_data) {
 | 
			
		||||
  if (state->count == 1) {
 | 
			
		||||
    register_code (KC_MSTP);
 | 
			
		||||
  }
 | 
			
		||||
  if (state->count >= 4) {
 | 
			
		||||
    uprintf("CMD:reflash\n");
 | 
			
		||||
    wait_ms (1000);
 | 
			
		||||
    reset_keyboard ();
 | 
			
		||||
    reset_tap_dance (state);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static void
 | 
			
		||||
_td_sr_reset (qk_tap_dance_state_t *state, void *user_data) {
 | 
			
		||||
  ergodox_right_led_1_off ();
 | 
			
		||||
  wait_ms (50);
 | 
			
		||||
  ergodox_right_led_2_off ();
 | 
			
		||||
  wait_ms (50);
 | 
			
		||||
  ergodox_right_led_3_off ();
 | 
			
		||||
 | 
			
		||||
  if (state->count == 1) {
 | 
			
		||||
    unregister_code (KC_MSTP);
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
qk_tap_dance_action_t tap_dance_actions[] = {
 | 
			
		||||
   [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN)
 | 
			
		||||
  ,[CT_TA]  = {
 | 
			
		||||
| 
						 | 
				
			
			@ -790,77 +856,75 @@ qk_tap_dance_action_t tap_dance_actions[] = {
 | 
			
		|||
  ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN)
 | 
			
		||||
  ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished)
 | 
			
		||||
  ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select)
 | 
			
		||||
  ,[CT_SR]  = ACTION_TAP_DANCE_FN_ADVANCED (_td_sr_each, _td_sr_finished, _td_sr_reset)
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
// Runs constantly in the background, in a loop.
 | 
			
		||||
void matrix_scan_user(void) {
 | 
			
		||||
  static uint32_t prev_layer_state;
 | 
			
		||||
  uint8_t layer = biton32(layer_state);
 | 
			
		||||
  bool is_arrow = false;
 | 
			
		||||
  static char *layer_lookup[] = {"Dvorak", "ADORE", "Arrows", "AppSel", "Hungarian", "Nav/Media", "Plover"};
 | 
			
		||||
 | 
			
		||||
  if (layer_state != prev_layer_state) {
 | 
			
		||||
    prev_layer_state = layer_state;
 | 
			
		||||
    if (layer_lookup[layer])
 | 
			
		||||
      uprintf("LAYER: %s\n", layer_lookup[layer]);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM)
 | 
			
		||||
    unregister_code (KC_LGUI);
 | 
			
		||||
 | 
			
		||||
  if (layer == HUN) {
 | 
			
		||||
    ergodox_right_led_2_on();
 | 
			
		||||
    ergodox_right_led_3_on();
 | 
			
		||||
  } else if (layer == NMDIA) {
 | 
			
		||||
    ergodox_right_led_1_on();
 | 
			
		||||
    ergodox_right_led_2_on();
 | 
			
		||||
  } else if (layer == PLVR) {
 | 
			
		||||
    ergodox_right_led_1_on ();
 | 
			
		||||
    ergodox_right_led_2_on ();
 | 
			
		||||
    ergodox_right_led_3_on ();
 | 
			
		||||
  } else if (layer == ADORE) {
 | 
			
		||||
    ergodox_right_led_1_on ();
 | 
			
		||||
    ergodox_right_led_2_on ();
 | 
			
		||||
    ergodox_right_led_3_on ();
 | 
			
		||||
  if (!skip_leds) {
 | 
			
		||||
    if (layer == HUN) {
 | 
			
		||||
      ergodox_right_led_2_on();
 | 
			
		||||
      ergodox_right_led_3_on();
 | 
			
		||||
    } else if (layer == NMDIA) {
 | 
			
		||||
      ergodox_right_led_1_on();
 | 
			
		||||
      ergodox_right_led_2_on();
 | 
			
		||||
    } else if (layer == PLVR) {
 | 
			
		||||
      ergodox_right_led_1_on ();
 | 
			
		||||
      ergodox_right_led_2_on ();
 | 
			
		||||
      ergodox_right_led_3_on ();
 | 
			
		||||
    } else if (layer == ADORE) {
 | 
			
		||||
      ergodox_right_led_1_on ();
 | 
			
		||||
      ergodox_right_led_2_on ();
 | 
			
		||||
      ergodox_right_led_3_on ();
 | 
			
		||||
 | 
			
		||||
    ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
 | 
			
		||||
      ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (layer_state & (1UL << ARRW)) {
 | 
			
		||||
    ergodox_right_led_1_on ();
 | 
			
		||||
    ergodox_right_led_3_on ();
 | 
			
		||||
    if (!skip_leds) {
 | 
			
		||||
      ergodox_right_led_1_on ();
 | 
			
		||||
      ergodox_right_led_3_on ();
 | 
			
		||||
    }
 | 
			
		||||
    is_arrow = true;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
 | 
			
		||||
      ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
 | 
			
		||||
    ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
 | 
			
		||||
    ergodox_right_led_1_on ();
 | 
			
		||||
  } else {
 | 
			
		||||
    ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
 | 
			
		||||
    if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow)
 | 
			
		||||
      ergodox_right_led_1_off ();
 | 
			
		||||
  }
 | 
			
		||||
  if (!skip_leds) {
 | 
			
		||||
    if (keyboard_report->mods & MOD_BIT(KC_LSFT) ||
 | 
			
		||||
        ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) {
 | 
			
		||||
      ergodox_right_led_1_set (LED_BRIGHTNESS_HI);
 | 
			
		||||
      ergodox_right_led_1_on ();
 | 
			
		||||
    } else {
 | 
			
		||||
      ergodox_right_led_1_set (LED_BRIGHTNESS_LO);
 | 
			
		||||
      if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow)
 | 
			
		||||
        ergodox_right_led_1_off ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
 | 
			
		||||
      ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) {
 | 
			
		||||
    ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
 | 
			
		||||
    ergodox_right_led_2_on ();
 | 
			
		||||
  } else {
 | 
			
		||||
    ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
 | 
			
		||||
    if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE)
 | 
			
		||||
      ergodox_right_led_2_off ();
 | 
			
		||||
  }
 | 
			
		||||
    if (keyboard_report->mods & MOD_BIT(KC_LALT) ||
 | 
			
		||||
        ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) {
 | 
			
		||||
      ergodox_right_led_2_set (LED_BRIGHTNESS_HI);
 | 
			
		||||
      ergodox_right_led_2_on ();
 | 
			
		||||
    } else {
 | 
			
		||||
      ergodox_right_led_2_set (LED_BRIGHTNESS_LO);
 | 
			
		||||
      if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE)
 | 
			
		||||
        ergodox_right_led_2_off ();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  if (keyboard_report->mods & MOD_BIT(KC_LCTRL) ||
 | 
			
		||||
      ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) {
 | 
			
		||||
    ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
 | 
			
		||||
    ergodox_right_led_3_on ();
 | 
			
		||||
  } else {
 | 
			
		||||
    ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
 | 
			
		||||
    if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow)
 | 
			
		||||
      ergodox_right_led_3_off ();
 | 
			
		||||
    if (keyboard_report->mods & MOD_BIT(KC_LCTRL) ||
 | 
			
		||||
        ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) {
 | 
			
		||||
      ergodox_right_led_3_set (LED_BRIGHTNESS_HI);
 | 
			
		||||
      ergodox_right_led_3_on ();
 | 
			
		||||
    } else {
 | 
			
		||||
      ergodox_right_led_3_set (LED_BRIGHTNESS_LO);
 | 
			
		||||
      if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow)
 | 
			
		||||
        ergodox_right_led_3_off ();
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  LEADER_DICTIONARY() {
 | 
			
		||||
| 
						 | 
				
			
			@ -974,7 +1038,9 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE
 | 
			
		|||
 UCIS_SYM("snowman", 0x2603),
 | 
			
		||||
 UCIS_SYM("coffee", 0x2615),
 | 
			
		||||
 UCIS_SYM("heart", 0x2764),
 | 
			
		||||
 UCIS_SYM("bolt", 0x26a1)
 | 
			
		||||
 UCIS_SYM("bolt", 0x26a1),
 | 
			
		||||
 UCIS_SYM("pi", 0x03c0),
 | 
			
		||||
 UCIS_SYM("mouse", 0x1f401)
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -43,6 +43,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest
 | 
			
		|||
* 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.
 | 
			
		||||
* 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.
 | 
			
		||||
* The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle.
 | 
			
		||||
* The **Fx** key is one-shot, and activates the **Media** layer, along with a one-shot `Alt`.
 | 
			
		||||
* 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.
 | 
			
		||||
* Tapping the `:` key once yields `:`, tapping it twice yields `;`.
 | 
			
		||||
* 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
 | 
			
		|||
 | 
			
		||||
Once 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.
 | 
			
		||||
 | 
			
		||||
The currently supported symbols are:
 | 
			
		||||
 | 
			
		||||
- `snowman`: ☃
 | 
			
		||||
- `kiss`: 😙
 | 
			
		||||
- `rofl`: 🤣
 | 
			
		||||
- `poop`: 💩
 | 
			
		||||
For the list of supported symbols, please see the source.
 | 
			
		||||
 | 
			
		||||
This is an experimental feature, and may or may not work reliably.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -65,7 +65,7 @@
 | 
			
		|||
      "x": 4.5,
 | 
			
		||||
      "f": 3
 | 
			
		||||
    },
 | 
			
		||||
    "F12",
 | 
			
		||||
    "Fx",
 | 
			
		||||
    {
 | 
			
		||||
      "a": 4,
 | 
			
		||||
      "f": 3,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -65,7 +65,7 @@
 | 
			
		|||
      "x": 4.5,
 | 
			
		||||
      "f": 3
 | 
			
		||||
    },
 | 
			
		||||
    "F12",
 | 
			
		||||
    "Fx",
 | 
			
		||||
    {
 | 
			
		||||
      "a": 4,
 | 
			
		||||
      "f": 3,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,7 +16,7 @@ _cmd_appsel () {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
cmd_appsel_music () {
 | 
			
		||||
    wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true
 | 
			
		||||
    wmctrl -x -a rhythmbox || wmctrl -x -a spotify || wmctrl -x -a kodi || true
 | 
			
		||||
    xdotool key Escape
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -25,7 +25,7 @@ cmd_appsel_slack () {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
cmd_appsel_emacs () {
 | 
			
		||||
    _cmd_appsel emacs24
 | 
			
		||||
    _cmd_appsel emacs
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cmd_appsel_term () {
 | 
			
		||||
| 
						 | 
				
			
			@ -37,6 +37,10 @@ cmd_appsel_chrome () {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
cmd_appsel_start () {
 | 
			
		||||
    if [ ! -z "${DISABLE_APPSEL_START}" ]; then
 | 
			
		||||
        return
 | 
			
		||||
    fi
 | 
			
		||||
 | 
			
		||||
    APPSEL_START=$(date +%s)
 | 
			
		||||
    if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then
 | 
			
		||||
        return
 | 
			
		||||
| 
						 | 
				
			
			@ -46,6 +50,10 @@ cmd_appsel_start () {
 | 
			
		|||
                -i /usr/share/icons/Adwaita/24x24/devices/video-display.png
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cmd_reflash () {
 | 
			
		||||
    teensy_loader_cli -v -w ~/src/ext/qmk_firmware/algernon.hex --mcu atmega32u4 || true
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cmd_help () {
 | 
			
		||||
    cat <<EOF
 | 
			
		||||
Use the source, Luke!
 | 
			
		||||
| 
						 | 
				
			
			@ -69,5 +77,3 @@ while read l; do
 | 
			
		|||
        cmd_${cmd}
 | 
			
		||||
    fi
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,12 +0,0 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}"
 | 
			
		||||
 | 
			
		||||
sudo "${HL}" | grep --line-buffered LAYER: | \
 | 
			
		||||
(while read line; do
 | 
			
		||||
     case $line in
 | 
			
		||||
         LAYER:*)
 | 
			
		||||
             layer="$(echo $(echo $line | cut -d: -f2-))"
 | 
			
		||||
             notify-send -i mark-location-symbolic "Switched to layer: $layer"
 | 
			
		||||
             ;;
 | 
			
		||||
     esac
 | 
			
		||||
 done)
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue