# keymap_ui: Infer use key equivalents \(\#34498\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 21b4a2ecdd9cae24fcc20b73c35eee278b51bbe3

Requested commit: 21b4a2ecdd9cae24fcc20b73c35eee278b51bbe3

Commit: 21b4a2ecdd9cae24fcc20b73c35eee278b51bbe3

Tree: 2826f6babd01ce2cd6771b5936cb8fdee8eac0b3

Author: Ben Kunkle

Committer: GitHub

## Message

```
keymap_ui: Infer use key equivalents (#34498)

Closes #ISSUE

This PR attempts to add workarounds for `use_key_equivalents` in the
keymap UI. First of all it makes it so that `use_key_equivalents` is
ignored when searching for a binding to replace so that replacing a
keybind with `use_key_equivalents` set to true does not result in a new
binding. Second, it attempts to infer the value of `use_key_equivalents`
off of a base binding when adding a binding by adding an optional `from`
parameter to the `KeymapUpdateOperation::Add` variant. Neither
workaround will work when the `from` binding for an add or the `target`
binding for a replace are not in the user keymap.

cc: @Anthony-Eid 

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

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

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