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

Modifier key stays pressed when it shouldn't during &mo layer switches #2847

Open
aymane-eljerari opened this issue Feb 27, 2025 · 0 comments

Comments

@aymane-eljerari
Copy link

I am using the layer + mod for my DSK layer. So when I hold the key, I am in layer DSK + LALT which I use to manage my desktop.

        // &mo DSK + LALT
        lm: layer_mod {
            compatible = "zmk,behavior-macro-two-param";
            wait-ms = <0>;
            tap-ms = <0>;
            #binding-cells = <2>;
            bindings
                = <&macro_param_1to1>
                , <&macro_press &mo MACRO_PLACEHOLDER>
                , <&macro_param_2to1>
                , <&macro_press &kp MACRO_PLACEHOLDER>
                , <&macro_pause_for_release>
                , <&macro_param_2to1>
                , <&macro_release &kp MACRO_PLACEHOLDER>
                , <&macro_param_1to1>
                , <&macro_release &mo MACRO_PLACEHOLDER>
                ;
        }

From the DSK layer, I hold another key to go to the CAM layer to control camera related binds.

This is the behavior for all camera shortcuts on the CAM layer:

        cam: camera_macro {
            compatible = "zmk,behavior-macro-one-param";
            wait-ms = <0>;
            tap-ms = <0>;
            #binding-cells = <1>;
            bindings
                = <&macro_press &kp LALT &kp LCTRL &kp LCMD>
                , <&macro_param_1to1>
                , <&kp MACRO_PLACEHOLDER>
                , <&macro_pause_for_release>
                , <&macro_release &kp LALT &kp LCTRL &kp LCMD>
                ;
        };

After I use a camera bind, and release all keys, I am sent back to the default layer with LALT being constantly pressed. So keys like these get sent: ˜®†∂∑µ®©

How can I make sure that LALT is not enabled in this case, I suspect it has to do with the fact that both behaviors use <&macro_pause_for_release>.

My full keymap

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