I want to create a key that is RCTRL when held, SQT when tapped once, and SEMI when tapped twice.
I used the "Advanced Example: Mod-Tap Nested inside Tap-Dance" from https://zmk.dev/docs/behaviors/tap-dance to create the behavior, but it doesn't work quite right when holding shift (to get the shifted version of SQT or SEMI).
Here is my code:
amr: alpha_mods_r {
compatible = "zmk,behavior-hold-tap";
label = "ALPHA_MT_R";
#binding-cells = <2>;
tapping-term-ms = <tapping_term_fast>;//<215>;//<250>;
quick-tap-ms = <quick_tap_term>;//<200>;//<150>;
flavor = "balanced";
bindings = <&kp>, <&kp>;
};
td_amr_1: tap_dance_amr_rctrl_sqt_semi {
compatible = "zmk,behavior-tap-dance";
label = "TAP_DANCE_AMR_RCTRL_SQT_SEMI";
#binding-cells = <0>;
tapping-term-ms = <tapping_term_xfast>;
bindings = <&amr RCTRL SQT>, <&kp SEMI>;
};
The problem is that unless I hold the shift key down for the entire tapping term, I get the unshifted SQT.
This creates an awkward pause when typing, but if I make the tapping term short enough to fix the problem, it creates a new problem of being impossible to tap quickly enough to get the double-tap.
I think what I need is instead of nesting a mod-tap inside a tap dance, I need to nest a tap dance inside a mod-tap, as the tap.
I tried the following, but found that this isn't supported:
td_r_1: tap_dance_sqt_semi {
compatible = "zmk,behavior-tap-dance";
label = "TAP_DANCE_SQT_SEMI";
#binding-cells = <0>;
tapping-term-ms = <tapping_term_fast>;
bindings = <&kp SQT>, <&kp SEMI>;
};
td_amr_1: tap_dance_amr_rctrl_sqt_semi {
compatible = "zmk,behavior-hold-tap";
label = "TAP_DANCE_AMR_RCTRL_SQT_SEMI";
#binding-cells = <2>;
tapping-term-ms = <tapping_term_slow>;
quick-tap-ms = <quick_tap_term>;
flavor = "balanced";
bindings = <&kp RCTRL>, <&td_r_1>;
};
Does anyone know how to fix this issue? If my idea is correct, but it requires a custom behavior to be created, can someone please help me out on how to create that?
Any help is appreaciated. Thanks.