# Fix macros on x11 sometimes resulting in incorrect input \(\#44234\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/7ba6f39e8284cb7b3522f137b0d724ad59740ddd)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 7ba6f39e8284cb7b3522f137b0d724ad59740ddd

Requested commit: 7ba6f39e8284cb7b3522f137b0d724ad59740ddd

Commit: 7ba6f39e8284cb7b3522f137b0d724ad59740ddd

Tree: baa2ef57d47b0a660bb6d5029c524b1a775fdf79

Author: Andre Roelofs

Committer: GitHub

## Message

```
Fix macros on x11 sometimes resulting in incorrect input (#44234)

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](https://github.com/user-attachments/files/23560570/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
```

## Parents

- [73b37e9774399780fb49901a4a2d0b025db4a2a8](https://git.cafe/gitcafe/zed/commit/73b37e9774399780fb49901a4a2d0b025db4a2a8?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/7ba6f39e8284cb7b3522f137b0d724ad59740ddd?format=markdown)
