Skip to content

Fix macros on x11 sometimes resulting in incorrect input#44234

Merged
probably-neb merged 12 commits intozed-industries:mainfrom
AndreRoelofs:fix/x11-macros-experimental
Dec 16, 2025
Merged

Fix macros on x11 sometimes resulting in incorrect input#44234
probably-neb merged 12 commits intozed-industries:mainfrom
AndreRoelofs:fix/x11-macros-experimental

Conversation

@AndreRoelofs
Copy link
Contributor

@AndreRoelofs AndreRoelofs commented Dec 5, 2025

Closes #40678

The python file below simulates the macros at various timings and can be run by running:

  1. sudo python3 -m pip install evdev --break-system-packages
  2. sudo python3 zed_shift_brace_replayer.py

Checked timings for hold=0.1, =0.01 and =0.001 with the latter two no longer causing incorrect inputs.

zed_shift_brace_replayer.py

Release Notes:

  • linux: fixed a race condition where the macros containing modifier + key would sometimes be processed without the modifier

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 5, 2025
@AndreRoelofs
Copy link
Contributor Author

Created a new PR with the experimental changes as discussed with @probably-neb

@probably-neb probably-neb self-assigned this Dec 5, 2025
@aqrln
Copy link
Contributor

aqrln commented Dec 6, 2025

(disclaimer that I'm not from Zed team and know nothing about the code, just randomly opened the PR, I can't help with any follow up questions 😄)

@AndreRoelofs
Copy link
Contributor Author

Thanks a lot @aqrln. I made the fixes.

@AndreRoelofs
Copy link
Contributor Author

I've been using this for almost 2 weeks now. I haven't run into a single issue. I used mostly ZMK and a little bit of regular. Everything works perfectly.

Is there anything I can do to help merge it?

@probably-neb
Copy link
Collaborator

Tests seem to be flaking. Will merge once they pass.

Thanks for the great work @AndreRoelofs!

@probably-neb probably-neb merged commit 7ba6f39 into zed-industries:main Dec 16, 2025
36 of 38 checks passed
@github-project-automation github-project-automation bot moved this from Community PRs to Done in Quality Week – December 2025 Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

Development

Successfully merging this pull request may close these issues.

Shift key ignored in keyboard macros

3 participants