Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hold-trigger-on-release cancels effect of hold-trigger-key-positions with flavor = "tap-unless-interrupted"; #2328

Open
PsychoThinker opened this issue Jun 9, 2024 · 0 comments

Comments

@PsychoThinker
Copy link

Issue

It seems to me that a configuration like the one below should work (I would like to achieve the behaviour described in this thread: reddit) - the hold functionality should ONLY be able to be triggered in scenarios when a key on the left half (e.g. A) is held down and any on the right half is pressed - and it does, but on the condition that we remove hold-trigger-on-release from this configuration (unfortunately it is an option we cannot give up if we want to be able to use more than one modifier).

Is there any reason why the options mentioned in the title do not work well together?

Code

#include <dt-bindings/zmk/keys.h>
#include <behaviors.dtsi>

/ {
    behaviors {
        lh_pht: left_positional_hold_tap {
            compatible = "zmk,behavior-hold-tap";
            #binding-cells = <2>;
            flavor = "tap-unless-interrupted";
            tapping-term-ms = <500>;
            quick-tap-ms = <250>;
            bindings = <&kp>, <&kp>;
            hold-trigger-key-positions = <5 6 7 8 9 10>;
            hold-trigger-on-release;
        };
    };

    keymap {
        compatible = "zmk,keymap";
        default_layer {
            bindings = <
                // position 0     pos 1             pos 2             pos 3             pos 4    pos 5    pos 6    pos 7    pos 8    pos 9    pos 10
                &lh_pht LSFT A    &lh_pht LGUI S    &lh_pht LALT D    &lh_pht LCTL F    &kp G    &kp H    &kp I    &kp J    &kp K    &kp L    &kp SEMI
            >;
        };
    };
};
@PsychoThinker PsychoThinker changed the title hold-trigger-on-release cancels effect of hold-trigger-key-positions with flavor = "tap-unless-interrupted";` hold-trigger-on-release cancels effect of hold-trigger-key-positions with flavor = "tap-unless-interrupted";` Jun 9, 2024
@PsychoThinker PsychoThinker changed the title hold-trigger-on-release cancels effect of hold-trigger-key-positions with flavor = "tap-unless-interrupted";` hold-trigger-on-release cancels effect of hold-trigger-key-positions with flavor = "tap-unless-interrupted"; Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant