# Find keystrokes defined on a child but handled by a parent \(\#2947\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e9747d0fea621d6d60cd80858027ea53bd9464ef

Requested commit: e9747d0fea621d6d60cd80858027ea53bd9464ef

Commit: e9747d0fea621d6d60cd80858027ea53bd9464ef

Tree: fbd8efe90c50204272bdf640fdb106e5f325698e

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Find keystrokes defined on a child but handled by a parent (#2947)

This fixes a bug that was preventing keystrokes from being shown on
tooltips for the "Buffer Search" and "Inline Assist" buttons in the
toolbar.

This pull request makes the behavior of `keystrokes_for_action` more
consistent with the behavior of `available_actions`. It seems reasonable
that, if a child view defines a keystroke for an action and that action
is handled on a parent, we should show the child's keystroke.

Release Notes:

- Fixed a bug that was preventing certain keystrokes from being shown in
tooltips.
```

## Parents

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

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

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