A_MPN,
// Application select keys
- APP_SLK, // Slack
+ APP_SLK, // Slack
APP_EMCS, // Emacs
APP_TERM, // Terminal
APP_CHRM, // Chrome
APP_MSIC, // Music
+ APP_SOCL, // Social
+ APP_PMGR, // Password manager
+ APP_SCL2, // Social #2
// Hungarian layer keys
HU_AA, // Á
/* Keymap 3: Application select layer
*
* ,-----------------------------------------------------. ,-----------------------------------------------------.
- * | |Music |Slack |Emacs |Term |Chrome| | | | | | | | | |
+ * | |Music |Slack |Emacs |Term |Chrome| | | |Social|PWMgr |Scl2 | | | |
* |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------|
* | | | | | | | | | | | | | | | |
* |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------|
,KC_TRNS
,KC_TRNS ,KC_TRNS ,KC_TRNS
- // right hand
- ,KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_TRNS
- ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
- ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
- ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
- ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+ // right hand
+ ,KC_TRNS ,M(APP_SOCL) ,M(APP_PMGR) ,M(APP_SCL2) ,KC_NO ,KC_NO ,KC_TRNS
+ ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+ ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+ ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
+ ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS
- ,KC_TRNS ,KC_TRNS
- ,KC_TRNS
- ,KC_TRNS ,KC_TRNS ,KC_TRNS
+ ,KC_TRNS ,KC_TRNS
+ ,KC_TRNS
+ ,KC_TRNS ,KC_TRNS ,KC_TRNS
),
// right hand
,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_UP ,KC_NO ,KC_NO ,KC_NO
+ ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RGHT ,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 = KC_8;
break;
case A_3:
- kc = KC_6;
+ kc = KC_4;
break;
case A_1:
- kc = KC_4;
+ kc = KC_6;
break;
case A_0:
if (record->event.pressed) {
register_code (KC_LGUI);
if (record->tap.count && !record->tap.interrupted) {
- if (record->tap.count >= 2) {
+ if (record->tap.count == 2) {
uprintf("CMD:appsel_start\n");
layer_on (APPSEL);
set_oneshot_layer (APPSEL, ONESHOT_START);
+ } else if (record->tap.count >= 3) {
+ uprintf("CMD:appsel_helper\n");
+ layer_off (APPSEL);
+ clear_oneshot_layer_state (ONESHOT_PRESSED);
}
} else {
record->tap.count = 0;
uprintf("CMD:appsel_music\n");
break;
+ case APP_SOCL:
+ if (record->event.pressed)
+ uprintf("CMD:appsel_social\n");
+ break;
+
+ case APP_PMGR:
+ if (record->event.pressed)
+ uprintf("CMD:appsel_pwmgr\n");
+ break;
+
+ case APP_SCL2:
+ if (record->event.pressed)
+ uprintf("CMD:appsel_social2\n");
+ break;
+
// number row and symbols
case A_1 ... A_0:
ang_handle_num_row(id, record);
}
}
+static void
+_td_brackets_finished (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ if (state->keycode == TD(CT_LBP))
+ register_code16 (KC_LBRC);
+ else
+ register_code16 (KC_RBRC);
+ } else if (state->count == 2) {
+ if (state->keycode == TD(CT_LBP))
+ register_code16 (KC_LPRN);
+ else
+ register_code16 (KC_RPRN);
+ } else if (state->count == 3) {
+ unicode_input_start();
+
+ if (state->keycode == TD(CT_LBP))
+ register_hex (0x300c);
+ else
+ register_hex (0x300d);
+
+ unicode_input_finish();
+ }
+}
+
+static void
+_td_brackets_reset (qk_tap_dance_state_t *state, void *user_data) {
+ if (state->count == 1) {
+ if (state->keycode == TD(CT_LBP))
+ unregister_code16 (KC_LBRC);
+ else
+ unregister_code16 (KC_RBRC);
+ } else if (state->count == 2) {
+ if (state->keycode == TD(CT_LBP))
+ unregister_code16 (KC_LPRN);
+ else
+ unregister_code16 (KC_RPRN);
+ }
+}
+
qk_tap_dance_action_t tap_dance_actions[] = {
[CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN)
,[CT_TA] = {
.fn = { NULL, ang_tap_dance_ta_finished, ang_tap_dance_ta_reset },
.user_data = (void *)&((td_ta_state_t) { false, false })
}
- ,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN)
- ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN)
+ ,[CT_LBP] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, _td_brackets_finished, _td_brackets_reset)
+ ,[CT_RBP] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, _td_brackets_finished, _td_brackets_reset)
,[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)
KC_S, KC_Z, KC_O, KC_N, KC_Y, KC_K, KC_RALT, KC_QUOT, KC_A, KC_M, 0);
}
+ SEQ_ONE_KEY (KC_K) {
+ ang_tap (KC_SPC, LSFT(KC_7), KC_SPC, 0);
+ register_code(KC_LCTL);
+ register_code(KC_LSFT);
+ register_code(KC_U);
+ unregister_code(KC_U);
+ unregister_code(KC_LSFT);
+ unregister_code(KC_LCTL);
+ ang_tap (KC_1, KC_F, KC_4, KC_7, KC_6, 0);
+ register_code (KC_ENT);
+ unregister_code (KC_ENT);
+ ang_tap (KC_END, 0);
+ register_code(KC_LCTL);
+ register_code(KC_LSFT);
+ register_code(KC_U);
+ unregister_code(KC_U);
+ unregister_code(KC_LSFT);
+ unregister_code(KC_LCTL);
+ ang_tap (KC_1, KC_F, KC_4, KC_7, KC_6, 0);
+ register_code (KC_SPC);
+ unregister_code (KC_SPC);
+ }
+
SEQ_ONE_KEY (KC_G) {
ang_tap (LSFT(KC_G), KC_E, KC_J, KC_G, KC_RALT, KC_EQL, KC_O,
KC_RALT, KC_EQL, KC_O,
UCIS_SYM("pi", 0x03c0),
UCIS_SYM("mouse", 0x1f401),
UCIS_SYM("micro", 0x00b5),
- UCIS_SYM("tm", 0x2122)
+ UCIS_SYM("tm", 0x2122),
+ UCIS_SYM("child", 0x1f476),
+ UCIS_SYM("family", 0x1F46A)
);
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
## Base layer
-[![Base layer](https://i.imgur.com/q1MDvq4.png)](http://www.keyboard-layout-editor.com/#/gists/28f7eb305fdbff943613e1dc7aa9e82b)
+[![Base layer](https://github.com/algernon/ergodox-layout/raw/master/images/base-layer.png)](http://www.keyboard-layout-editor.com/#/gists/28f7eb305fdbff943613e1dc7aa9e82b)
At its core, this is a Dvorak layout, with some minor changes. The more interesting parts are how certain keys behave:
* The number row is the same as in the [ADORE](#adore-layer) layer. The function keys are on the **Media** layer.
* 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.
-* 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 `GUI` key is special, because while a single tap works as usual, when double-tapped, it turns the number row into an application selector, and when triple tapped, it runs an application selector program on the host.
* 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`.
- `LEAD d` toggles logging keypress positions to the HID console.
- `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader.
- `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode.
-
+
The 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.
## ADORE layer
-[![ADORE layer](https://i.imgur.com/r3LnQAA.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a)
+[![ADORE layer](https://github.com/algernon/ergodox-layout/raw/master/images/adore-layer.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a)
My experimental layout, that I keep tweaking. No full description here, because things are very much in flux.
## Steno layer
-[![Steno layer for Plover](https://i.imgur.com/PgifhBF.png)](http://www.keyboard-layout-editor.com/#/gists/401ef9a84369e47c57f9aedcf0a0d667)
+[![Steno layer for Plover](https://github.com/algernon/ergodox-layout/raw/master/images/steno-layer.png)](http://www.keyboard-layout-editor.com/#/gists/401ef9a84369e47c57f9aedcf0a0d667)
This is to be used with [Plover](http://www.openstenoproject.org/plover/), nothing really fancy here. The **STENO** key toggles the layer on and off, and sends the toggle command to Plover too.
The generated heatmap looks somewhat like this:
- ![Heatmap](https://i.imgur.com/tly9XSy.png)
+ ![Heatmap](https://github.com/algernon/ergodox-layout/raw/master/images/heatmap.png)
## Layer notification
# Building
-To 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:
+To 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 `layouts/community/algernon_master`, or symlinked there. One way to achieve that is this:
[algernon:ez-layout]: https://github.com/algernon/ergodox-layout
[qmk]: https://github.com/qmk/qmk_firmware
$ git clone https://github.com/qmk/qmk_firmware.git
$ cd qmk_firmware
$ git clone https://github.com/algernon/ergodox-layout.git \
- keyboards/ergodox/keymaps/algernon-master
-$ make keyboard=ergodox keymap=algernon-master
+ layouts/community/ergodox/algernon_master
+$ make ergodox_ez-algernon_master
```
From time to time, updates may be submitted back to the QMK repository. If you are reading it there, you can build the firmware like any other firmware included with it (assuming you are in the root directory of the firmware):
```
-$ make keyboard=ergodox keymap=algernon
+$ make ergodox_ez-algernon
```
## Using on Windows
# License
The layout, being a derivative of the original TMK firmware which is under the GPL-2+, this layout is under the GPL as well, but GPL-3+, rather than the older version.
-
-![nav-n-media-layer.png](https://i.imgur.com/AReX8C9.png)
-![hun-layer.png](https://i.imgur.com/uPGBl9J.png)
\ No newline at end of file