# Fix Keymap Editor "Search by Keystrokes" shortcut shadowed by the text finder \(\#63376\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d7b9b38584cdb1e778a781548d32da35b2be1e96

Requested commit: d7b9b38584cdb1e778a781548d32da35b2be1e96

Commit: d7b9b38584cdb1e778a781548d32da35b2be1e96

Tree: 735cdd1acd4cc7f0f5298d73e313075f8ff95379

Author: denizdogan

Committer: GitHub

## Message

```
Fix Keymap Editor "Search by Keystrokes" shortcut shadowed by the text finder (#63376)

# Objective

Fixes #62361.

In the Keymap Editor, focus lands on the "Filter action names" input,
which is wrapped in a `BufferSearchBar` key context
(`crates/keymap_editor/src/keymap_editor.rs`). Its `cmd-alt-f →
text_finder::Toggle` binding (added in #60677) shadows the
`KeymapEditor` context's `cmd-alt-f →
keymap_editor::ToggleKeystrokeSearch`, because `BufferSearchBar` sits
deeper in the focus stack — so `cmd-alt-f` in the filter opens the file
finder instead of toggling "Search by Keystrokes". Same collision on
Linux (`ctrl-alt-f`); Windows is unaffected (it uses `alt-f`).

## Solution

Add a `KeymapEditor > BufferSearchBar` binding mapping the chord back to
`keymap_editor::ToggleKeystrokeSearch`, in `default-macos.json` and
`default-linux.json`. It's more specific than the plain
`BufferSearchBar` binding and placed after the `KeymapEditor` block, so
it wins the same-depth tie-break (gpui precedence: depth, then
definition order) — restoring the shortcut inside the Keymap Editor
without affecting the global text finder.

I gave the `KeymapEditor` binding precedence rather than rebinding
"Search by Keystrokes" to a non-conflicting default (e.g. `cmd-alt-k`),
since it's less invasive and doesn't change a documented default. Happy
to switch to the rebind if the team prefers.

## Testing

Built and ran locally on macOS: opened the Keymap Editor (`cmd-k
cmd-s`), pressed `cmd-alt-f` with focus in the filter → "Search by
Keystrokes" toggles instead of opening the file finder; confirmed the
file finder still works normally in a regular editor. `cargo test -p zed
keymap` passes (validates the bundled keymaps parse and all actions
resolve).

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Tests cover the new/changed behavior (bundled-keymap validation
exercises the new binding; runtime behavior manually verified — no logic
to unit-test in a default-keymap change)

_Unsafe blocks / UI standards / performance: N/A for a keymap default
change._


Release Notes:

- Fixed the Keymap Editor's "Search by Keystrokes" shortcut (`cmd-alt-f`
/ `ctrl-alt-f`) being shadowed by the file finder.
```

## Parents

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

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