Skip to content

Commit

Permalink
Semantic Keys updated
Browse files Browse the repository at this point in the history
Most Symbols are now handled via semantic keys.
paired « ‹  › » enabled via semantic keys.
Tidied up process record a bit.
Tweaked adaptive for vb (and other variations)
  • Loading branch information
moutis authored Nov 15, 2023
1 parent f676a5a commit eaf7be0
Show file tree
Hide file tree
Showing 15 changed files with 267 additions and 268 deletions.
42 changes: 21 additions & 21 deletions handsdown/au-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,26 @@
// These few spatial combos may move to accommodate some mnemonic combos,
// notably the H-digraph combos that inhabit close areas.
//
#define HD_tab_keys HD_LM4, HD_LM3 // tab
#define HD_stab_keys HD_LM4, HD_LM3, HD_LM1 // shift-tab
// SEMANTIC FUNCTIONS ** uses SemKeys **
// Spatially arranged on the QWERTY ZXCV locations
// independent of the HD Alphas, though since some of
// the above combos may compete for the same locations,
// we'll define them all here.
//
#define HD_new_keys HD_LM2, HD_LB2 // new
#define HD_open_keys HD_LM1, HD_LB1 // open
#define HD_close_keys HD_LM3, HD_LB3 // close
#define HD_quit_keys HD_LB0, HD_LM0 // quit
#define HD_find_keys HD_RM4, HD_RB0 // find selection
#define HD_sall_keys HD_LB4, HD_LB1 // select all
#define HD_swrd_keys HD_LB4, HD_LB0 // select word
#define HD_undo_keys HD_LB4, HD_LB3 // undo
#define HD_redo_keys HD_LB4, HD_LB3, HD_LB2 // redo
#define HD_copy_keys HD_LB3, HD_LB2 // copy (hold for cut)
#define HD_pste_keys HD_LB2, HD_LB1 // paste (hold for paste-match)

#define HD_tab_keys HD_LT4, HD_LT3 // tab
#define HD_stab_keys HD_LT4, HD_LT3, HD_LT2 // Shift-tab
#define HD_spc_keys HD_LM1, HD_LM0 // SPACE
#define HD_ent_keys HD_LB0, HD_LB1 // ENTER
#define HD_ent2_keys HD_LB0, HD_LB1, HD_LB2 // hard-ENTER/page break
Expand All @@ -161,7 +179,7 @@
// TEXT ENTRY - off map standard alphas (also on Layer L_SYM @ Z=LT4 & Q=LT3)
//
#define HD_Qu_keys HD_LT3, HD_LT1 // TYPE "q" (Qu & Linger deletes u)
#define HD_L1_keys HD_LT1, HD_LT0 // ex. TYPE "z"
#define HD_L1_keys HD_LM3, HD_LM1 // ex. TYPE "z"
#define HD_L1 HD_Z
//#define HD_L2_keys HD_LM3, HD_LM1 // ex. TYPE "x"
//#define HD_L2 HD_X
Expand Down Expand Up @@ -224,24 +242,6 @@
#endif // EN_PRONOUNS_ALL
#endif // EN_PRONOUNS // the entirely unnecessary pronoun combo shenanigans

// SEMANTIC FUNCTIONS ** uses SemKeys **
// Spatially arranged on the QWERTY ZXCV locations
// independent of the HD Alphas, though since some of
// the above combos may compete for the same locations,
// we'll define them all here.
//
#define HD_new_keys HD_LM2, HD_LB2 // new
#define HD_open_keys HD_LM1, HD_LB1 // open
#define HD_close_keys HD_LM3, HD_LB3 // close
#define HD_quit_keys HD_LB0, HD_LM0 // quit
#define HD_find_keys HD_RM4, HD_RB0 // find selection
#define HD_sall_keys HD_LB4, HD_LB1 // select all
#define HD_swrd_keys HD_LB4, HD_LB0 // select word
#define HD_undo_keys HD_LB4, HD_LB3 // undo
#define HD_redo_keys HD_LB4, HD_LB3, HD_LB2 // redo
#define HD_copy_keys HD_LB3, HD_LB2 // copy (hold for cut)
#define HD_pste_keys HD_LB2, HD_LB1 // paste (hold for paste-match)

#ifdef JP_MODE_ENABLE
#ifdef JP_YOUON_COMBOS
// Major Japanese contracted consonants as combos
Expand Down
42 changes: 21 additions & 21 deletions handsdown/mi-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,26 @@
// These few spatial combos may move to accommodate some mnemonic combos,
// notably the H-digraph combos that inhabit close areas.
//
#define HD_tab_keys HD_LM3, HD_LM1 // tab
#define HD_stab_keys HD_LM3, HD_LM2, HD_LM1 // hard-ENTER/page break
// SEMANTIC FUNCTIONS ** uses SemKeys **
// Spatially arranged on the QWERTY ZXCV locations
// independent of the HD Alphas, though since some of
// the above combos may compete for the same locations,
// we'll define them all here.
//
#define HD_new_keys HD_LM2, HD_LB2 // new
#define HD_open_keys HD_LM1, HD_LB1 // open
#define HD_close_keys HD_LM3, HD_LB3 // close
#define HD_quit_keys HD_LB0, HD_LM0 // quit
#define HD_find_keys HD_RM4, HD_RB0 // find selection
#define HD_sall_keys HD_LB4, HD_LB1 // select all
#define HD_swrd_keys HD_LB4, HD_LB0 // select word
#define HD_undo_keys HD_LB4, HD_LB3 // undo
#define HD_redo_keys HD_LB4, HD_LB3, HD_LB2 // redo
#define HD_copy_keys HD_LB3, HD_LB2 // copy (hold for cut)
#define HD_pste_keys HD_LB2, HD_LB1 // paste (hold for paste-match)

#define HD_tab_keys HD_LT4, HD_LT3 // tab
#define HD_stab_keys HD_LT4, HD_LT3, HD_LT2 // Shift-tab
#define HD_spc_keys HD_LM1, HD_LM0 // SPACE
#define HD_ent_keys HD_LB0, HD_LB1 // ENTER
#define HD_ent2_keys HD_LB0, HD_LB1, HD_LB2 // hard-ENTER/page break
Expand All @@ -161,7 +179,7 @@
// TEXT ENTRY - off map standard alphas (also on Layer L_SYM @ Z=LT4 & Q=LT3)
//
#define HD_Qu_keys HD_LT3, HD_LT1 // TYPE "q" (Qu & Linger deletes u)
#define HD_L1_keys HD_LT1, HD_LT0 // ex. TYPE "z"
#define HD_L1_keys HD_LM3, HD_LM1 // ex. TYPE "z"
#define HD_L1 HD_X
//#define HD_L2_keys HD_LM3, HD_LM1 // ex. TYPE "x"
//#define HD_L2 HD_X
Expand Down Expand Up @@ -224,24 +242,6 @@
#endif // EN_PRONOUNS_ALL
#endif // EN_PRONOUNS // the entirely unnecessary pronoun combo shenanigans

// SEMANTIC FUNCTIONS ** uses SemKeys **
// Spatially arranged on the QWERTY ZXCV locations
// independent of the HD Alphas, though since some of
// the above combos may compete for the same locations,
// we'll define them all here.
//
#define HD_new_keys HD_LM2, HD_LB2 // new
#define HD_open_keys HD_LM1, HD_LB1 // open
#define HD_close_keys HD_LM3, HD_LB3 // close
#define HD_quit_keys HD_LB0, HD_LM0 // quit
#define HD_find_keys HD_RM4, HD_RB0 // find selection
#define HD_sall_keys HD_LB4, HD_LB1 // select all
#define HD_swrd_keys HD_LB4, HD_LB0 // select word
#define HD_undo_keys HD_LB4, HD_LB3 // undo
#define HD_redo_keys HD_LB4, HD_LB3, HD_LB2 // redo
#define HD_copy_keys HD_LB3, HD_LB2 // copy (hold for cut)
#define HD_pste_keys HD_LB2, HD_LB1 // paste (hold for paste-match)

#ifdef JP_MODE_ENABLE
#ifdef JP_YOUON_COMBOS
// Major Japanese contracted consonants as combos
Expand Down
42 changes: 21 additions & 21 deletions handsdown/nu-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,26 @@
// These few spatial combos may move to accommodate some mnemonic combos,
// notably the H-digraph combos that inhabit close areas.
//
#define HD_tab_keys HD_LM3, HD_LM1 // tab
#define HD_stab_keys HD_LM3, HD_LM2, HD_LM1 // hard-ENTER/page break
// SEMANTIC FUNCTIONS ** uses SemKeys **
// Spatially arranged on the QWERTY ZXCV locations
// independent of the HD Alphas, though since some of
// the above combos may compete for the same locations,
// we'll define them all here.
//
#define HD_new_keys HD_LM2, HD_LB2 // new
#define HD_open_keys HD_LM1, HD_LB1 // open
#define HD_close_keys HD_LM3, HD_LB3 // close
#define HD_quit_keys HD_LB0, HD_LM0 // quit
#define HD_find_keys HD_LM4, HD_LM0 // find selection
#define HD_sall_keys HD_LB4, HD_LB1 // select all
#define HD_swrd_keys HD_LB4, HD_LB0 // select word
#define HD_undo_keys HD_LB4, HD_LB3 // undo
#define HD_redo_keys HD_LB4, HD_LB3, HD_LB2 // redo
#define HD_copy_keys HD_LB3, HD_LB2 // copy (hold for cut)
#define HD_pste_keys HD_LB2, HD_LB1 // paste (hold for paste-match)

#define HD_tab_keys HD_LT4, HD_LT3 // tab
#define HD_stab_keys HD_LT4, HD_LT3, HD_LT2 // Shift-tab
#define HD_spc_keys HD_LM1, HD_LM0 // SPACE
#define HD_ent_keys HD_LH2, HD_LH1 // ENTER
#define HD_ent2_keys HD_LB0, HD_LB1, HD_LB2 // hard-ENTER/page break
Expand All @@ -161,7 +179,7 @@
// TEXT ENTRY - off map standard alphas (also on Layer L_SYM @ Z=LT4 & Q=LT3)
//
#define HD_Qu_keys HD_LT3, HD_LT1 // TYPE "q" (Qu & Linger deletes u)
#define HD_L1_keys HD_LT1, HD_LT0 // ex. TYPE "z"
#define HD_L1_keys HD_LM3, HD_LM1 // ex. TYPE "z"
#define HD_L1 HD_Z
//#define HD_L2_keys HD_LM3, HD_LM1 // ex. TYPE "x"
//#define HD_L2 HD_X
Expand Down Expand Up @@ -224,24 +242,6 @@
#endif // EN_PRONOUN_keysS_ALL
#endif // EN_PRONOUN_keysS // the entirely unnecessary pronoun combo shenanigans

// SEMANTIC FUNCTIONS ** uses SemKeys **
// Spatially arranged on the QWERTY ZXCV locations
// independent of the HD Alphas, though since some of
// the above combos may compete for the same locations,
// we'll define them all here.
//
#define HD_new_keys HD_LM2, HD_LB2 // new
#define HD_open_keys HD_LM1, HD_LB1 // open
#define HD_close_keys HD_LM3, HD_LB3 // close
#define HD_quit_keys HD_LB0, HD_LM0 // quit
#define HD_find_keys HD_LM4, HD_LM0 // find selection
#define HD_sall_keys HD_LB4, HD_LB1 // select all
#define HD_swrd_keys HD_LB4, HD_LB0 // select word
#define HD_undo_keys HD_LB4, HD_LB3 // undo
#define HD_redo_keys HD_LB4, HD_LB3, HD_LB2 // redo
#define HD_copy_keys HD_LB3, HD_LB2 // copy (hold for cut)
#define HD_pste_keys HD_LB2, HD_LB1 // paste (hold for paste-match)

#ifdef JP_MODE_ENABLE
#ifdef JP_YOUON_COMBOS
// Major Japanese contracted consonants as combos
Expand Down
14 changes: 11 additions & 3 deletions handsdown/vb-adaptive.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)
case KC_B:
switch (prior_keycode) {
case KC_P: // avoid row step (PS is 40x more common than PB)
tap_code(KC_S);
return_state = false; // done.
case KC_C: // eliminate SB SFB (CB is 11x more common than SB)
tap_code(KC_BSPC);
tap_code(KC_S);
Expand All @@ -59,7 +61,9 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)
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_B: // tricksy - trilling "mxm" results in "mbl" trigram instead of scissor
// but this makes norman BM = BL...so not great. proper adaptive method is needed
// that recognizes N-gram sequences. Maybe at the migrate to RP2040 or the like?
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)
Expand Down Expand Up @@ -94,11 +98,13 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)
break;
case KC_W:
switch (prior_keycode) {
case KC_L: // tricksy - trilling "wmw" results in "lml" trigram instead of SFB
case KC_B: // tricksy - trilling "mxw" results in "mbl" trigram scissoring
case KC_L: // tricksy - trilling "wmw" results in "lml" trigram instead of2 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
case KC_J: //
tap_code(KC_P); // pull up P from bottom row.
return_state = false; // done.
break;
Expand All @@ -114,6 +120,9 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)
goto PullUpLAndExit; // short jumps save bytes
case KC_M:
goto ReplacePriorWithL;
case KC_J:
tap_code(KC_P); // yields jpg
break;
case KC_W:
tap_code(KC_BSPC);
send_string("lml"); // for "calmly" but not quite intuitive…
Expand Down Expand Up @@ -175,7 +184,6 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)
tap_code(KC_G);
return_state = false; // done.
break;
case KC_V: // Pull S down from middle row.
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...)
Expand Down
61 changes: 30 additions & 31 deletions handsdown/vb-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
#define HD_LT2 HD_M
#define HD_LT1 HD_G
#define HD_LT0 HD_J
#define HD_LTA OSL(L_CFG)
#define HD_RTA TG(L_NUM)
#define HD_LTA LT(L_CFG, KC_MUTE)
#define HD_RTA LT(L_CFG, KC_MPLY)
#define HD_RT0 HD_HASH
#define HD_RT1 HD_DOT
#define HD_RT2 HD_SLSH
Expand Down Expand Up @@ -108,9 +108,9 @@
#define HD_LB1 HD_D
#define HD_LB0 HD_V
#define HD_LBA LT(L_NUM, KC_LBRC)
#define HD_LBB LT(L_FUN,SK_COPY)
#define HD_RBB LT(L_FUN,SK_PSTE)
#define HD_RBA LT(L_NAV,KC_RBRC)
#define HD_LBB LT(L_CFG, KC_LNG2)
#define HD_RBB LT(L_FUN, KC_LNG1)
#define HD_RBA LT(L_NAV, KC_RBRC)
#define HD_RB0 HD_MINS
#define HD_RB1 HD_U
#define HD_RB2 HD_O
Expand All @@ -120,7 +120,7 @@

//Primary Thumbs 1-3 (others are unique to the board)
#define HD_LH5 KC_LEFT
#define HD_LH4 LT(L_FUN,KC_MUTE)
#define HD_LH4 KC_RGHT
#define HD_LH3 KC_APP
#define HD_LH2 HD_BSPC
#define HD_LH1 HD_R
Expand All @@ -131,8 +131,8 @@
#define HD_RH1 HD_SPC
#define HD_RH2 HD_ENT
#define HD_RH3 TG(L_NUM)
#define HD_RH4 LT(L_FUN,KC_MPLY)
#define HD_RH5 KC_DN
#define HD_RH4 KC_UP
#define HD_RH5 KC_DOWN

#ifdef COMBO_ENABLE
//
Expand All @@ -151,17 +151,36 @@
// These few spatial combos may move to accommodate some mnemonic combos,
// notably the H-digraph combos that inhabit close areas.
//
#define HD_tab_keys HD_LM3, HD_LM1 // tab
#define HD_stab_keys HD_LM3, HD_LM2, HD_LM1 // hard-ENTER/page break
// SEMANTIC FUNCTIONS ** uses SemKeys **
// Spatially arranged on the QWERTY ZXCV locations
// independent of the HD Alphas, though since some of
// the above combos may compete for the same locations,
// we'll define them all here.
//
#define HD_new_keys HD_LM2, HD_LB2 // new
#define HD_open_keys HD_LM1, HD_LB1 // open
#define HD_close_keys HD_LM3, HD_LB3 // close
#define HD_quit_keys HD_LB0, HD_LM0 // quit
#define HD_find_keys HD_LM4, HD_LM0 // find selection
#define HD_sall_keys HD_LB4, HD_LB1 // select all
#define HD_swrd_keys HD_LB4, HD_LB0 // select word
#define HD_undo_keys HD_LB4, HD_LB3 // undo
#define HD_redo_keys HD_LB4, HD_LB3, HD_LB2 // redo
#define HD_copy_keys HD_LB3, HD_LB2 // copy (hold for cut)
#define HD_pste_keys HD_LB2, HD_LB1 // paste (hold for paste-match)

#define HD_tab_keys HD_LT4, HD_LT3 // tab
#define HD_stab_keys HD_LT4, HD_LT3, HD_LT2 // Shift-tab
#define HD_spc_keys HD_LM1, HD_LM0 // SPACE
#define HD_ent_keys HD_LB0, HD_LB1 // ENTER
#define HD_ent2_keys HD_LB0, HD_LB1, HD_LB2 // hard-ENTER/page break
#define APPMENU_keys HD_LT1, HD_LT0 // APPMENU
#define APPMENU_nav_keys LN_LT1, LN_LT0 // APPMENU

// TEXT ENTRY - off map standard alphas (also on Layer L_SYM @ Z=LT4 & Q=LT3)
//
#define HD_Qu_keys HD_LT3, HD_LT1 // TYPE "q" (Qu & Linger deletes u)
#define HD_L1_keys HD_LT4, HD_LT3 // ex. TYPE "z"
#define HD_L1_keys HD_LM3, HD_LM1 // ex. TYPE "z"
#define HD_L1 HD_Z
//#define HD_L2_keys HD_LM3, HD_LM1 // ex. TYPE "x"
//#define HD_L2 HD_X
Expand Down Expand Up @@ -227,26 +246,6 @@



// SEMANTIC FUNCTIONS ** uses SemKeys **
// Spatially arranged on the QWERTY ZXCV locations
// independent of the HD Alphas, though since some of
// the above combos may compete for the same locations,
// we'll define them all here.
//
#define HD_new_keys HD_LM2, HD_LB2 // new
#define HD_open_keys HD_LM1, HD_LB1 // open
#define HD_close_keys HD_LM3, HD_LB3 // close
#define HD_quit_keys HD_LB0, HD_LM0 // quit
#define HD_find_keys HD_LM4, HD_LM0 // find selection
#define HD_sall_keys HD_LB4, HD_LB1 // select all
#define HD_swrd_keys HD_LB4, HD_LB0 // select word
#define HD_undo_keys HD_LB4, HD_LB3 // undo
#define HD_redo_keys HD_LB4, HD_LB3, HD_LB2 // redo
#define HD_copy_keys HD_LB3, HD_LB2 // copy (hold for cut)
#define HD_pste_keys HD_LB2, HD_LB1 // paste (hold for paste-match)



#ifdef JP_MODE_ENABLE
#ifdef JP_YOUON_COMBOS
// Major Japanese contracted consonants as combos
Expand Down
2 changes: 1 addition & 1 deletion handsdown/vv-adaptive.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ bool process_adaptive_key(uint16_t *calling_keycode, const keyrecord_t *record)
return_state = false; // done.
break;
case KC_J:
tap_code(KC_P);
tap_code(KC_P); // yields jpg
break;
case KC_K:
goto PullUpLAndExit; // short jumps save bytes
Expand Down
Loading

0 comments on commit eaf7be0

Please sign in to comment.