# terminal: Prevent extra character on handled meta keystrokes \(\#14151\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6db0b6c5ad8f9ba6183da6b0ee5839eb3d013029

Requested commit: 6db0b6c5ad8f9ba6183da6b0ee5839eb3d013029

Commit: 6db0b6c5ad8f9ba6183da6b0ee5839eb3d013029

Tree: 2b84cb538dbac6b7449b4982fbf537c3ad0faf00

Author: Denis Washington

Committer: GitHub

## Message

```
terminal: Prevent extra character on handled meta keystrokes (#14151)

On macOS, when `terminal.option_as_meta` is enabled, pressing key
combinations like `option+b` and `option+f` would lead to both an escape
sequence being sent to the terminal (the expected behavior with
`option_as_meta == true`) AND a character being inserted (the behavior
when `option_as_meta == false`). Prevent the latter by stopping
propagation of the key-down event if it corresponds to a terminal escape
sequence and `option_as_meta` is enabled.

Fixes #7728

Release Notes:

- Fixed insertion of extra characters for some keystrokes if
`terminal.option_as_meta` is enabled
([#7728](https://github.com/zed-industries/zed/issues/7728)).
```

## Parents

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

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