# ui: Allow hiding keybinding labels \(\#63616\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 2b0562a825e3c3717ea5c5a457091466cb98083d

Requested commit: 2b0562a825e3c3717ea5c5a457091466cb98083d

Commit: 2b0562a825e3c3717ea5c5a457091466cb98083d

Tree: 620da2c1c8d0171e6e7551e92fd64095edb1bd24

Author: Jakub Konka

Committer: GitHub

## Message

```
ui: Allow hiding keybinding labels (#63616)

`KeyBinding` elements currently always render their shortcut labels.
Applications with a touch-oriented interface cannot remove those
keyboard-only visual affordances without changing each consumer or
unregistering the shortcuts themselves.

This adds an application-wide visibility policy to the reusable
`KeyBinding` component, so context menus and other consumers follow the
same setting. Registered keybindings and `aria-keyshortcuts` remain
intact, and labels remain visible by default.

## Testing

- `cargo nextest run -p ui --lib`
- `cargo fmt --check`
- The final unused-override cleanup was not rerun because `nix develop`
currently fails while building the existing `zed-editor-deps`
derivation: `corgi-patches/scratch/Cargo.toml` is absent from its Nix
source.

Release Notes:

- N/A
```

## Parents

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

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