# keymap_editor: Fix incorrect keystroke being reported \(\#36998\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 38e5c8fb66ac19f5836e3c0590cc9dcf3e77e87e

Requested commit: 38e5c8fb66ac19f5836e3c0590cc9dcf3e77e87e

Commit: 38e5c8fb66ac19f5836e3c0590cc9dcf3e77e87e

Tree: f0370dba5bbe2d296127a57ff01b7cd2ee5a4432

Author: 张小白

Committer: GitHub

## Message

```
keymap_editor: Fix incorrect keystroke being reported (#36998)

This PR fixes two bugs and also changes one behavior in the **Keymap
Editor**.

As shown in the video, when I press `ctrl-shift-2` in the Keymap Editor,
the first keystroke is displayed as `ctrl-shift-@`, which is incorrect.
On macOS and Linux, it should be `ctrl-@`.



https://github.com/user-attachments/assets/69cfcfa0-b422-45d6-8e69-80f8608180fd



Also, after pressing `ctrl-shift-2` and then releasing `2` and `ctrl`, a
`shift` keystroke was incorrectly added.



https://github.com/user-attachments/assets/892124fd-847d-4fde-9b20-a27ba49ac934



Now, when you enter a sequence like `+ctrl+alt-alt+f` in the Keymap
Editor, it will output `ctrl-f` instead of `ctrl-alt-f`, matching VS
Code’s behavior.


Release Notes:

- Fixed incorrect keystroke reporting in the Keymap Editor.
```

## Parents

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

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