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

[BUG] sticky key in macro does not release #2609

Open
Incblob opened this issue Nov 4, 2024 · 1 comment
Open

[BUG] sticky key in macro does not release #2609

Incblob opened this issue Nov 4, 2024 · 1 comment

Comments

@Incblob
Copy link

Incblob commented Nov 4, 2024

Bug:

When a macro that contains a sticky LSHIFT is run while other typing is happening, the release for the LSHIFT is either not read/ not sent, resulting in a stuck LSHIFT.
Unplugging the kb does not release the key.
This affects not only typing but the OS.
The shift key is effectively always pressed.

To release the LSHIFT, you have to either

  • unplug the kb, reconnect, then rerun the same macro, and allow it to finish
  • run a macro containing &macro_release &kp LSHIFT

I'm connected via USB, if that makes a difference.
I'm assuming that this will happen with other modifiers as well.

Config:

  • The quick-release must be enabled for sticky keys.
  • There needs to be one keypress before the sticky key in the macro.
&sk {
    release-after-ms = <1000>;
    quick-release;
};

ZMK_MACRO(test_sk,
        wait-ms = <20>;
        tap-ms = <20>;
        bindings = <&kp SPACE &sk LSHIFT>; 
    )
ZMK_MACRO(release_sk,
        wait-ms = <20>;
        tap-ms = <20>;
        bindings = <&macro_release &kp LSHIFT>;
    )

example typing behavior:

ststststst* sTSTSTSTSTS**tststststst
*start of sk macro
**release macro

Environment:

OS: Win10
board: Horizon
repo: https://github.com/Incblob/zmk-config-horizon
connection: USB

@lesshonor
Copy link
Contributor

It might be a good idea for you to test #2257.

https://zmk.dev/docs/features/modules#beta-testing

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

2 participants