Update hold-tap config for positional-hold-tap fix

This commit is contained in:
urob 2022-08-05 10:29:07 -04:00
parent 5849f077fd
commit 7f24c642cc

View file

@ -1,15 +1,9 @@
/*
ISSUES, WORKAROUNDS and a "ZMK-WISHLIST"
* tap-only combos not yet possible (#544), prevents rapid chording of HRMs
* no chording with positional hold-taps (#1363)
* &bootloader doesn't work with Planck_rev6 (#1086)
* no global-quick-tap for combos yet
* mod-taps getting stuck with heterogenous combo-terms (#986, #905)
* sticky-hold swallows OS shift when typing quickly, using sticky-tap for now
* native sleep key doesn't work with windows (#1077), using sleep-macro for now
* no native unicode support (#232), using preprocessor workaround instead
* no native mouse keys (#319), using mouse PR #778
* mod-morph doesn't swallow mod (#686), using masked-mod PR #1114
* invalid DFU suffix signature warning when flashing with dfu-util
*/
@ -44,7 +38,7 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST"
#define FN 4
#define UC 5
#define QUICK_TAP_MS 220
#define QUICK_TAP_MS 175
#include "combos.dtsi" // source after layer shortcuts
#include "mouse.dtsi"
@ -71,28 +65,26 @@ ISSUES, WORKAROUNDS and a "ZMK-WISHLIST"
/* homerow mods */
#define HRM_LT LM1 LM2 LM3 LM4 // left-hand HRMs
#define HRM_RT RM1 RM2 RM3 RM4 // right-hand HRMs
#define KEYS_LT LT0 LT1 LT2 LT3 LT4 LM0 HRM_LT LB0 LB1 LB2 LB3 LB4 // left-hand keys
#define KEYS_RT RT0 RT1 RT2 RT3 RT4 RM0 HRM_RT RB0 RB1 RB2 RB3 RB4 // right-hand keys
#define THUMBS LH2 LH1 LH0 RH0 RH1 RH2 // thumb keys
#define KEYS_L LT0 LT1 LT2 LT3 LT4 LM0 LM1 LM2 LM3 LM4 LB0 LB1 LB2 LB3 LB4 // left-hand keys
#define KEYS_R RT0 RT1 RT2 RT3 RT4 RM0 RM1 RM2 RM3 RM4 RB0 RB1 RB2 RB3 RB4 // right-hand keys
#define THUMBS LH2 LH1 LH0 RH0 RH1 RH2 // thumb keys
ZMK_BEHAVIOR(hml, hold_tap, // left-hand HRMs
flavor = "balanced";
tapping-term-ms = <200>;
tapping-term-ms = <280>;
quick-tap-ms = <QUICK_TAP_MS>;
global-quick-tap-ms = <150>;
bindings = <&kp>, <&kp>;
hold-trigger-key-positions = <KEYS_RT THUMBS HRM_LT>; // include left-hand HRMs for chording
hold-trigger-key-positions = <KEYS_R THUMBS>;
)
ZMK_BEHAVIOR(hmr, hold_tap, // right-hand HRMs
flavor = "balanced";
tapping-term-ms = <200>;
tapping-term-ms = <280>;
quick-tap-ms = <QUICK_TAP_MS>;
global-quick-tap-ms = <150>;
bindings = <&kp>, <&kp>;
hold-trigger-key-positions = <KEYS_LT THUMBS HRM_RT>; // include right-hand HRMs for chording
hold-trigger-key-positions = <KEYS_L THUMBS>;
)
/* custom keys and macros */
@ -107,7 +99,7 @@ ZMK_BEHAVIOR(ss_cw, tap_dance,
ZMK_BEHAVIOR(bs_del_num, mod_morph,
bindings = <&lt NUM BSPC>, <&kp DEL>;
mods = <(MOD_LSFT|MOD_RSFT)>;
masked_mods = <MOD_LSFT>; // requires PR #1114
masked-mods = <MOD_LSFT>; // requires PR #1412
)
// Windows sleep key
@ -117,6 +109,29 @@ ZMK_BEHAVIOR(win_sleep, macro,
bindings = <&kp LG(X) &kp U &kp S>;
)
// Sticky layer + sticky shift
ZMK_BEHAVIOR(uc_shift, macro,
wait-ms = <0>;
tap-ms = <1>;
bindings = <&macro_press &mo UC &kp LSHFT>
, <&macro_pause_for_release>
, <&macro_release &mo UC &kp LSHFT>;
)
/ {
behaviors {
sls: sticky_uc_shift {
compatible = "zmk,behavior-sticky-key";
label = "STICKY_UC_SHIFT";
#binding-cells = <1>;
release-after-ms = <1000>;
bindings = <&uc_shift>;
ignore-modifiers;
};
};
};
/* keymap */
ZMK_LAYER(default_layer,
@ -127,7 +142,7 @@ ZMK_LAYER(default_layer,
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
&kp Z &kp X &kp C &kp D &kp V EXTRA_MID &kp K &kp H &kp COMMA &kp DOT &kp SEMI
// ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤ ├─────────────┤ ├─────────────┼─────────────┼─────────────┼─────────────┼─────────────┤
EXTRA_BOT_L &lt UC ESC &lt NAV SPACE &lt SYS TAB EXTRA_MID &lt FN RET &ss_cw &bs_del_num EXTRA_BOT_R
EXTRA_BOT_L &lt SYS ESC &lt NAV SPACE &lt UC TAB EXTRA_MID &lt FN RET &ss_cw &bs_del_num EXTRA_BOT_R
// ╰─────────────╯ ╰─────────────┴──── ────────┴─────────────╯ ╰─────────────╯ ╰─────────────┴─────────────┴─────────────╯ ╰─────────────╯
)