Skip to content

Commit

Permalink
Update to QMK 0.22.2
Browse files Browse the repository at this point in the history
Some cleaned up definition files for a few keyboards and HD variations as I work toward Miryoku level abstractions.
  • Loading branch information
moutis authored Sep 6, 2023
1 parent 0dc3808 commit 3eafe21
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 102 deletions.
2 changes: 1 addition & 1 deletion config.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
#undef COMBO_TERM
#endif
// these COMBO_TERM have dilicate interactions with ADAPTIVE_TERM below.
#define COMBO_TERM (TAPPING_TERM/5) // time to get all combo keys down
#define COMBO_TERM (TAPPING_TERM/4) // time to get all combo keys down
#define COMBO_HOLD (TAPPING_TERM) // time to hold to trigger delayed combo
#endif

Expand Down
123 changes: 62 additions & 61 deletions handsdown/vv-adaptive.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,26 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)
/*
// Left hand adaptives (most are single-handed neighbor fingers, bc speed, dexterity limits)
*/
case KC_C:
case KC_G:
switch (prior_keycode) {
case KC_T: // roll for tch
send_string("ch"); // 85% of tc is tch, so this saves a lot of key press "H"
return_state = false; // done.
break;
case KC_B: // eliminate BS SFB (BS is 23x more common than BC)
tap_code(KC_S); //
case KC_W:
tap_code(KC_BSPC);
send_string("lml"); // for "calmly" but not quite intuitive…
return_state = false; // done.
break;
}
break;
case KC_V: // VP/PV = SP/PS
switch (prior_keycode) {
case KC_P: // avoid row step (PS is 246x more common than PV)
tap_code(KC_S);
return_state = false; // done.
case KC_J:
tap_code(KC_P);
break;
case KC_K:
goto PullUpLAndExit; // short jumps save bytes
case KC_M:
goto ReplacePriorWithL;
}
break;
case KC_M: // M becomes L (pull up "L" to same row)
switch (prior_keycode) {
case KC_B: // tricksy - trilling "mxm" results in "mbl" trigram instead of scissor
case KC_P: // tricksy - trilling "mwm" results in "mpl" trigram instead of scissor
// rolling "xwm" is also captured here, resulting in "xpl"
case KC_G: // pull up "L" (GL is 5x more common than GM)
case KC_C: // rolling "xwm" is captured here, resulting in "xcl" (taking a trigram that would step down a row at each letter, and making it a simple inward roll, replacing a trigram that does not appear in Mayzner's corpus = infinite win)
case KC_X: // pull up "L" (XL is 1.5x more common than XM)
PullUpLAndExit:
tap_code(KC_L); // pull up "L" (PL is 15x more common than PM)
Expand All @@ -78,57 +72,68 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)
case KC_D: // (for KD=KL; least code, no side effects)
switch (prior_keycode) { //
case KC_K:
case KC_V:
goto PullUpLAndExit; // short jumps save bytes
}
break;

case KC_L: // catch this so we can unshift L on these rolls.
switch (prior_keycode) {
case KC_B: //
case KC_P: //
case KC_S: //
goto PullUpLAndExit; // no change except shift is now off
}
break;
case KC_W:
switch (prior_keycode) {
case KC_M: // eliminate SFB (modest 7x gain)
case KC_L: // tricksy - trilling "wmw" results in "lml" trigram instead of SFB
goto PullUpLAndExit; // short jumps save bytes
case KC_X: // pull up P (W becomes P after X to set up "xp"+l)
case KC_M: // pull up P (W becomes P abter M to set up "mp"+l)
*calling_keycode = KC_P; // tricksy - pretend the last was P, for "mpl" or "xpl" trigram
tap_code(KC_P); // pull up P from bottom row.
return_state = false; // done.
break;
case KC_G:
tap_code(KC_D); // eliminate SFB.
return_state = false; // done.
break;
case KC_X: // XC is 117x more common than XW (also set up "xc"+l)
*calling_keycode = KC_C; // tricksy - pretend the last was C, for "xcl"
tap_code(KC_C); // eliminate row step.
return_state = false; // done.
break;
}
break;
case KC_G:
case KC_F:
switch (prior_keycode) {
case KC_K:
goto PullUpLAndExit; // short jumps save bytes
case KC_M:
goto ReplacePriorWithL;
case KC_W:
case KC_D: //
tap_code(KC_G); // eliminate SFB (DG is 10x more common than DF)
return_state = false; // done.
break;
case KC_V: //
tap_code(KC_BSPC);
send_string("lml"); // for "calmly" but not quite intuitive…
tap_code(KC_S); // avoid row step (311x more common than VF)
break;
}
break;
case KC_C:
switch (prior_keycode) {
case KC_T: // roll for tch
send_string("ch"); // 85% of tc is tch, so this saves a lot of "H" key presses
return_state = false; // done.
break;
}
break;
case KC_V:
switch (prior_keycode) {
case KC_F: // avoid row step (91x more frequent)
tap_code(KC_S);
return_state = false; // done.
break;
}
break;

case KC_K: // remedy ring-index split by shifting fingering
switch (prior_keycode) {
case KC_T: // TK/DK/GK = LK ()
case KC_T: // TK/DK/GK = CK (252x more frequent)
tap_code(KC_BSPC);
tap_code(KC_C);
break;
case KC_D: // DV/TV/GV = LV ()
case KC_G: //
case KC_D: // DK = LK (11x more frequent)
case KC_G: // GK = LK (74x more frequent)
goto ReplacePriorWithL; // short jumps save bytes
}
break;
Expand All @@ -151,32 +156,17 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)

case KC_X:
switch (prior_keycode) {
case KC_P: // MW->MP, so MPL rolling out
case KC_W:
case KC_W: // eliminate scissor (2818x gain)
goto PullUpLAndExit;
case KC_M: // "MB" is 2558x more frequent than "MX"
*calling_keycode = KC_B; // tricksy - pretend the last was B, for "mbl" trigram
tap_code(KC_B); // pull up B from bottom row.
case KC_M: // eliminate scissor (107x gain)
tap_code(KC_F); // pull up F from bottom row.
return_state = false; // done.
break;
case KC_G:
tap_code(KC_T); // eliminate SFB.
tap_code(KC_T); // eliminate SFB (778x gain)
return_state = false; // done.
break;
}
case KC_P:
switch (prior_keycode) {
case KC_D: // DP = DT eliminate SFB (DT is 2.5x more common)
tap_code(KC_G);
return_state = false; // done.
break;
case KC_V: // Pull S down from middle row. (VP/PV = SP/PS)
case KC_B: // Pull S down [SP is 83x more common than BP]
tap_code(KC_BSPC);
tap_code(KC_S); //(but maybe should be BS? SP/BS are about equal...)
return_state = true; // not done (process this key normally)
break;
}
break;


Expand All @@ -187,33 +177,33 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)
case KC_H: // H precedes a vowel much more often than it follows (thanks, Ancient Greek!)
switch (prior_keycode) { // maybe OK? What about xxR? resulting in a SFB on thumb?
case KC_A: // AE is a fraction less common, but I find the EAE trill harder than EAH.
tap_code(KC_U); // "AH" yields "AU" (8x more common)
tap_code(KC_U); // "AH" yields "AU" (8x more common, eliminates SFB)
return_state = false; // done.
break;
case KC_E:
tap_code(KC_O); // "EH" yields "EO" (1.75:1)
return_state = false; // done.
break;
case KC_O:
tap_code(KC_E); // "OH" yields "OE" (almost 1:1, but eliminates an SFB?)
tap_code(KC_E); // "OH" yields "OE" (almost 1:1, but eliminates an SFB)
return_state = false; // done.
break;
case KC_U:
tap_code(KC_A); // "UH" yields "UA" (126x more common)
return_state = false; // done.
break;
case KC_I: // avoid row skip on outward pinky roll
tap_code(KC_F); // "IH" yields "IF" (96x more common)
tap_code(KC_P); // "IH" yields "IP" (41x more common)
return_state = false; // done.
break;

}
break;

case KC_F:
case KC_P:
switch (prior_keycode) {
case KC_Y: //
tap_code(KC_I); // YF = YI (eliminate SFB on ring finger YI is 37x YF)
tap_code(KC_I); // YP = YI (eliminate SFB on ring finger YI is 37x YF)
return_state = false; // done.
break;
}
Expand All @@ -237,13 +227,24 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)
send_string("com");
return_state = false; // done.
break;
case KC_QUOT: //
case KC_J: //
case KC_B: //
tap_code(KC_O); // (eliminate scissor)
return_state = false; // done.
break;
}
break;
case KC_DOT:
switch (prior_keycode) {
case KC_QUOT: // This could be smarter (only after O rolled up)
case KC_J: //
case KC_B: //
tap_code(KC_U); // (eliminate scissor)
return_state = false; // done.
break;
}
break;
case KC_B:
switch (prior_keycode) {
case KC_DOT:
Expand Down
12 changes: 6 additions & 6 deletions handsdown/vv-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// ╭─────────────────╮ ╭─────────────────╮
// │ X W M G "[ │ │ #$ .: '] J B │
// │ S C N T K | | ,; A E I H │
// │ V P L D /* │ │ -+ U O Y F │
// │ V F L D /* │ │ -+ U O Y F │
// ╰───────╮ BSP R │ │ SPC RET ╭──────╯
// ╰─────────╯ ╰──────────╯
//
Expand Down Expand Up @@ -107,15 +107,15 @@
#define HD_RM4 HD_H

#define HD_LB4 HD_V
#define HD_LB3 HD_P
#define HD_LB3 HD_F
#define HD_LB2 HD_L
#define HD_LB1 HD_D
#define HD_LB0 HD_SLSH
#define HD_RB0 HD_MINS
#define HD_RB1 HD_U
#define HD_RB2 HD_O
#define HD_RB3 HD_Y
#define HD_RB4 HD_F
#define HD_RB4 HD_P

//Primary Thumbs (others unique to the board)
#define HD_LH2 HD_BSPC
Expand Down Expand Up @@ -158,7 +158,7 @@
#define HD_Ch_keys HD_LM3, HD_LM2 // TYPE "ch"
#define HD_Wh_keys HD_LT3, HD_LT2 // TYPE "wh"
#define HD_Sh_keys HD_LM4, HD_LM3 // TYPE "sh"
#define HD_Ph_keys HD_LB3, HD_LB1 // TYPE "ph"
#define HD_Ph_keys HD_RB3, HD_RB4 // TYPE "ph"
#define HD_Gh_keys HD_LT2, HD_LT1 // TYPE "gh"
#define HD_Sch_keys HD_LM4, HD_LM3, HD_LM2 // TYPE "Sch"

Expand All @@ -179,9 +179,9 @@
#ifdef EN_PRONOUN_COMBOS_ALL // Admittedly of questionable value
#define HD_youd_keys HD_Y, HD_D // TYPE "you'd" + 've
#define HD_youll_keys HD_Y, HD_L // TYPE "you'll" + 've
#define HD_youre_keys HD_Y, HD_R // TYPE "you're"
#define HD_youre_keys HD_Y, HD_QUOT // TYPE "you're"
#define HD_youve_keys HD_Y, HD_V // TYPE "you've"
#define HD_your_keys HD_Y, HD_P // TYPE "your" "P" for "possessive" case
#define HD_your_keys HD_Y, HD_R // TYPE "your" "P" for "possessive" case

#define HD_their_keys HD_T, HD_B // TYPE "their" #6 (R on same finger in Neu)
#define HD_theyre_keys HD_T, HD_X // "they're" (R on same finger in Neu)
Expand Down
4 changes: 2 additions & 2 deletions moutis_combo.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ enum my_combos {
FC_LANG1, // kana (others)

HC_TAB,
HC_PCT, // % percent
HC_DQUO, // " hijacked for $
// HC_PCT, // % percent (hold = for %)
HC_DOLR, // $
HC_HASH, // #
HC_QUES, // ?
HC_EXLM, // !
Expand Down
10 changes: 5 additions & 5 deletions moutis_combo_def.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ const uint16_t PROGMEM Hmdsh_combo[] = {HD_RB0, HD_RB2, COMBO_END}; // — m das
const uint16_t PROGMEM Htild_combo[] = {HD_RB0, HD_RB4, COMBO_END}; // ~ tilde (not the deadkey for eñye)
const uint16_t PROGMEM Hunds_combo[] = {HD_RB1, HD_RB3, COMBO_END}; // _ underscore
const uint16_t PROGMEM Hequal_combo[] = {HD_RB2, HD_RB3, COMBO_END}; // = equal (hold for %)
const uint16_t PROGMEM Hpercent_combo[] = {HD_RB3, HD_RB4, COMBO_END}; // % percent
//const uint16_t PROGMEM Hpercent_combo[] = {HD_RB3, HD_RB4, COMBO_END}; // % percent


// spatially arranged characters and diacritics
const uint16_t PROGMEM Hscln_combo[] = {HD_RM0, HD_RM1, COMBO_END}; // ; semicolon
const uint16_t PROGMEM Hcoln_combo[] = {HD_RT1, HD_RT3, COMBO_END}; // : colon
const uint16_t PROGMEM Hexlm_combo[] = {HD_RT1, HD_RT2, COMBO_END}; // !
const uint16_t PROGMEM Hques_combo[] = {HD_RT2, HD_RT3, COMBO_END}; // ?
const uint16_t PROGMEM Hdquo_combo[] = {HD_RT2, HD_RT4, COMBO_END}; // " DOUBLE QUOTE // " hijacked for $
const uint16_t PROGMEM Hdolr_combo[] = {HD_RT2, HD_RT4, COMBO_END}; // " DOUBLE QUOTE // " hijacked for $
const uint16_t PROGMEM Htic_combo[] = {HD_RT3, HD_RT4, COMBO_END}; // ` tic (not dead key grave)

const uint16_t PROGMEM Hhash_combo[] = {HD_RT0, HD_RT2, COMBO_END}; // # HASH hijacked for §
Expand Down Expand Up @@ -273,17 +273,17 @@ combo_t key_combos[] = {
// These simple combos trigger on press, repeat. HC_kbd_combo
[HC_KBD] = COMBO(HC_kbd_combo, MO(L_MEDIA_KBD)), // keyboard/media settings/config layer
[HC_APP] = COMBO(H_menu_combo, KC_APP), // app menu
[HC_PCT] = COMBO(Hpercent_combo, KC_PERC), // %
// [HC_PCT] = COMBO(Hpercent_combo, KC_PERC), // % (hold = for %)
[HC_SCLN] = COMBO(Hscln_combo, KC_SCLN), // ;
[HC_COLN] = COMBO_ACTION(Hcoln_combo), // : (hold for elipsis)
[HC_UNDS] = COMBO_ACTION(Hunds_combo), // _ underscore
[HC_TILD] = COMBO(Htild_combo, KC_TILD), // ~ or SK_TILD?
[HC_TIC] = COMBO(Htic_combo, KC_GRAVE), // ` (not dead)
[HC_EXLM] = COMBO(Hexlm_combo, KC_EXLM), // !
[HC_QUES] = COMBO(Hques_combo, KC_QUES), // ?
[HC_DQUO] = COMBO(Hdquo_combo, KC_DLR), // " hijacked for $
[HC_DOLR] = COMBO(Hdolr_combo, KC_DLR), // $
[HC_HASH] = COMBO(Hhash_combo, SK_SECT), // # hijacked for §
[HC_AT] = COMBO_ACTION(Hat_combo), // @ & alanreiser.com if held
[HC_AT] = COMBO_ACTION(Hat_combo), // @ (hold for alanreiser.com)
[HC_TAB] = COMBO(Htab_combo, KC_TAB),

[HC_Q] = COMBO_ACTION(H_Q_combo),
Expand Down
14 changes: 7 additions & 7 deletions mykeyboards/Atreus/atreus_hd_keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_Z, KC_X, KC_C, KC_V, KC_B, TT(L_NUMPAD), LT(L_FN_NUM,KC_MPLY), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
KC_LEFT, KC_RGHT, KC_APP, LT(L_MEDIA_KBD,KC_MUTE), LT(L_FN_NUM,KC_BSPC), LT(L_NAV,KC_DEL), LT(L_MEDIA_KBD,KC_MUTE), LT(L_PUNCT,KC_SPC), LT(L_NAV,KC_ENT), LT(L_MEDIA_KBD,KC_MPLY), KC_UP, KC_DOWN),
[L_HDALPHA] = LAYOUT(
HD_LT4, HD_LT3, HD_LT2, HD_LT1, HD_LT0, HD_RT0, HD_RT1, HD_RT2, HD_RT3, HD_RT4,
HD_LM4, HD_LM3, HD_LM2, HD_LM1, HD_LM0, HD_RM0, HD_RM1, HD_RM2, HD_RM3, HD_RM4,
HD_LB4, HD_LB3, HD_LB2, HD_LB1, HD_LB0, ____, ____, HD_RB0, HD_RB1, HD_RB2, HD_RB3, HD_RB4,
____, ____, LT(L_MEDIA_KBD,KC_Z), HD_LH2, HD_LH1, KC_APP, ____, HD_RH1, HD_RH2, LT(L_MEDIA_KBD,KC_Q), ____, ____),
HD_LT4, HD_LT3, HD_LT2, HD_LT1, HD_LT0, HD_RT0, HD_RT1, HD_RT2, HD_RT3, HD_RT4,
HD_LM4, HD_LM3, HD_LM2, HD_LM1, HD_LM0, HD_RM0, HD_RM1, HD_RM2, HD_RM3, HD_RM4,
HD_LB4, HD_LB3, HD_LB2, HD_LB1, HD_LB0, LT(L_NUMPAD, KC_LBRC), LT(L_NAV,KC_RBRC), HD_RB0, HD_RB1, HD_RB2, HD_RB3, HD_RB4,
____, ____, KC_APP, HD_LH2, HD_LH1, LT(L_MEDIA_KBD,KC_Q), LT(L_MEDIA_KBD,KC_Z), HD_RH1, HD_RH2, ____, ____, ____),
[L_PUNCT] = LAYOUT(
KC_Z, KC_Q, RALT(KC_5), LALT(KC_7), LSA(KC_7), LALT(KC_4), KC_DLR, A(S(KC_2)), RALT(KC_3), LALT(KC_Y),
KC_LT, KC_LBRC, KC_LPRN, KC_LCBR, RSA(KC_5), RALT(KC_1), RSFT_T(KC_PAST), RGUI_T(KC_PEQL), RALT_T(KC_PPLS), RCTL_T(KC_PSLS),
KC_GT, KC_RBRC, KC_RPRN, KC_RCBR, LALT(KC_8), ____, ____, KC_UNDS, KC_PIPE, KC_AMPR, KC_CIRC, KC_PERC,
____, ____, ____, SK_DELWDL, SK_DELWDR, ____, LSA(KC_8), ____, ____, ____, ____, ____),
[L_FN_NUM] = LAYOUT(
KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_GRV, KC_6, KC_7, KC_8, KC_BSLS,
LCTL_T(KC_F5), LALT_T(KC_F6), LGUI_T(KC_F7), LSFT_T(KC_F8), KC_F14, KC_SCLN, RSFT_T(KC_1), RGUI_T(KC_5), RALT_T(KC_9), RCTL_T(KC_SLSH), KC_F1, KC_F2, KC_F3, KC_F4, KC_F15, KC_PAUS, KC_TAB, KC_MINS, KC_2, KC_3, KC_4, KC_EQL, KC_PSCR, KC_LSCR, ____, KC_BSPC, KC_ENT, ____, KC_DEL, KC_0, KC_DOT, KC_COMM, ____, ____),
KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_GRV, KC_7, KC_8, KC_9, KC_BSLS,
LCTL_T(KC_F5), LALT_T(KC_F6), LGUI_T(KC_F7), LSFT_T(KC_F8), KC_F14, KC_SCLN, RSFT_T(KC_1), RGUI_T(KC_2), RALT_T(KC_3), RCTL_T(KC_SLSH), KC_F1, KC_F2, KC_F3, KC_F4, KC_F15, KC_PAUS, KC_TAB, KC_MINS, KC_4, KC_5, KC_6, KC_EQL, KC_PSCR, KC_LSCR, ____, KC_BSPC, KC_ENT, ____, KC_DEL, KC_0, KC_DOT, KC_COMM, ____, ____),
[L_NUMPAD] = LAYOUT(
KC_LNUM, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
LALT_T(KC_TAB), KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS,
Expand All @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
SK_UNDO, SK_CUT, SK_COPY, SK_PSTE, SK_PSTM, KC_ESC, KC_TAB, SK_DOCEND, KC_END, KC_DOWN, KC_PGDN, SK_PARANXT,
SK_HISTPRV, SK_HISTNXT, ____, ____, ____, ____, ____, SK_HISTPRV, SK_HISTNXT, SK_ZOOMRST, SK_ZOOMOUT, SK_ZOOMIN),
[L_MEDIA_KBD] = LAYOUT(
_no_, EE_CLR, AG_SWAP, CG_SWAP, LCA(KC_DEL), SK_KILL, KC_NUM, KC_EJCT, _no_, SK_ZOOMRST,
QK_RBT, AG_SWAP, CG_SWAP, EE_CLR, LCA(KC_DEL), SK_KILL, KC_NUM, KC_EJCT, _no_, SK_ZOOMRST,
HD_AdaptKeyToggle, HD_L_QWERTY, HD_L_ALPHA, KC_VOLU, KC_BRIU, _no_, KC_MPRV, KC_MUTE, KC_MNXT, SK_ZOOMOUT,
QK_BOOT, AG_NORM, CG_NORM, KC_VOLD, KC_BRID, _no_, _no_, _no_, KC_MRWD, KC_MPLY, KC_MFFD, SK_ZOOMIN,
_no_, _no_, TG(L_NUMPAD), _no_, _no_, _no_, _no_, _no_, _no_, _no_, _no_, _no_)
Expand Down
Loading

0 comments on commit 3eafe21

Please sign in to comment.