# linux: Fix caps lock not working consistently for certain X11 systems \(\#35361\) · gitcafe/zed

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

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

Visibility: public

Requested revision: cdce3b362045d458353d5cdddcffaf5010662481

Requested commit: cdce3b362045d458353d5cdddcffaf5010662481

Commit: cdce3b362045d458353d5cdddcffaf5010662481

Tree: 4a8b8b65e0a7e87459225efbe729a22db649a5e8

Author: Smit Barmase

Committer: GitHub

## Message

```
linux: Fix caps lock not working consistently for certain X11 systems (#35361)

Closes #35316

Bug in https://github.com/zed-industries/zed/pull/34514

Turns out you are not supposed to call `update_key` for modifiers on
`KeyPress`/`KeyRelease`, as modifiers are already updated in
`XkbStateNotify` events. Not sure why this only causes issues on a few
systems and works on others.

Tested on Ubuntu 24.04.2 LTS (initial bug) and Kubuntu 25.04 (worked
fine before too).

Release Notes:

- Fixed an issue where caps lock stopped working consistently on some
Linux X11 systems.
```

## Parents

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

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