planck one shot

thursday, 13 july 2017

finding one shot modifiers very useful in relaxing the finger timing for key chords, I was interested in seeing if adding a Shift one shot modifier to the thumb row would make typing feel more rhythmic.

Adding it to the right thumb balances out the thumb frequency a touch, bonus! – with the left thumb assigned to Space..

one shot shift

One shot Colemak CG

Note the rearrangement of the thumb keys compared to the Colemak Mod-CG. The left thumb now has all the end of word/sentence space keys so that there is a natural left right hand alternation. Added to that, the mirror complement of right hand one shot modifiers completes the changes.

To not lose the cursor key cluster entirely, it is added to the Shift Layer..

One shot shift layer

not quite as handy as before, requiring the Left Shift but still easily accessible.

The biggest hurdle was overcoming the decades of right hand Enter and left hand Escape key memory.

double tap shift

then the obvious dawned. I could have my cake and eat it too!

By adding the one shot modifier to the tap dance shift code which was written to address latency issues..

  ...   else if (state->count > 1) {   tap_key (keycode);   if (DT_SHIFT) {   set_oneshot_mods(MOD_LSFT);   }   else {   layer_on(layer);   }   }   ...

double tapping the Space or Enter would achieve the desired result with the original layout whilst inserting a Space or Enter for a natural typing rhythm..

One shot shift layers

The Space and Enter keys still retain their normal Shift functionality and, more importantly, remain in their familiar left and right thumb positions, with an added smart one shot mode when double tapped. And auto-repeat on triple tap (double tap down). Mission accomplished!

one shot symbol layer

the Numeric Keypad Layer mirrored the Symbol Layer placement of the parenthesis, brace, curly brace and angle bracket symbol pairs. While this made for ease of memory, it always felt somewhat awkward alternating hands to type these symbol pairs with the left hand (and left thumb down) when effectively in right hand numeric keypad mode – especially, when contrasted to the ease of typing the same symbols from the Symbol Layer.

By foregoing the mirrored symbol pair placement layout, all typed characters can be located on the right hand and modifiers on the left. Since symbols, when entering numeric values, are usually single character insertions, a one shot layer (tap layer key) defines their shift number values, with symbol pairs and hexadecimal characters moved to a raised layer (layer key down).

Again, tap dance to the rescue..

void symhex(qk_tap_dance_state_t *state, void *user_data) {   if (state->pressed) {   layer_on(_NUMHEX);   }   else {   layer_on(_NUMSYM);   set_oneshot_layer(_NUMSYM, ONESHOT_START);   } }   void symhex_reset(qk_tap_dance_state_t *state, void *user_data) {   layer_off(_NUMHEX);   clear_oneshot_layer_state(ONESHOT_PRESSED); }   qk_tap_dance_action_t tap_dance_actions[] = {  ...  ,[_NHEX] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, symhex, symhex_reset)  ... };

The addition of the one shot layer separates the previous dual layer organization into arguably cleaner and more obvious logical groupings across three layers..

Numeric keypad with one shot symbol layer

Opening or double tapping a symbol pair is placed in its most effective position, hence, the visually odd reversal of the symbol characters!

Similarly, a one shot layer is introduced on the Symbol Navigation Layer so that the tap action can be used (optionally, in this case) for the REGEX extension characters using the one shot layer macro..

Symbol layer with one shot REGEX extension layer

───  planck qmk

comment ?