# Skip key down event if preceded by its key equivalent version · gitcafe/zed

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

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

Visibility: public

Requested revision: 318deed25b4bad1c0d0cfc29749a50a06a87590b

Requested commit: 318deed25b4bad1c0d0cfc29749a50a06a87590b

Commit: 318deed25b4bad1c0d0cfc29749a50a06a87590b

Tree: 3a9a6f83beebf244e711553bba0b8be21922bc94

Author: Antonio Scandurra

Committer: Antonio Scandurra

## Message

```
Skip key down event if preceded by its key equivalent version

Previously, we would only track whether the previous key down event
was a key equivalent. However, this could cause issues when pressing
certain keystrokes in rapid succession, e.g.:

- Pressing `shift-right` (to select a character)
- Pressing a character (with or without `shift` held down)

This would cause GPUI to ignore the second event because it was
preceded by a key equivalent event. With this commit, we track the
last key equivalent event, and skip the key down event only if it
matches the last key equivalent event.

```

## Parents

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

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