ZIm/crates/zed
Ben Kunkle deb2564b31
gpui: Add keybind metadata API (#33316)
Closes #ISSUE

Adds a very simple API to track metadata about keybindings in GPUI,
namely the source of the binding. The motivation for this is displaying
the source of keybindings in the [keymap
UI](https://github.com/zed-industries/zed/pull/32436).

The API is designed to be as simple and flexible as possible, storing
only a `Option<u32>` on the bindings themselves to keep the struct
small. It is intended to be used as an index or key into a table/map
created and managed by the consumer of the API to map from indices to
arbitrary meta-data. I.e. the consumer is responsible for both
generating these indices and giving them meaning.

The current usage in Zed is stateless, just a mapping between constants
and User, Default, Base, and Vim keymap sources, however, this can be
extended in the future to also track _which_ base keymap is being used.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-06-24 16:07:45 +00:00
..
contents Fix bundle script 2023-11-17 17:44:41 -08:00
resources Add (flatpak) and (snap) suffixes to Zed version in system info (#32903) 2025-06-17 20:39:35 +00:00
src gpui: Add keybind metadata API (#33316) 2025-06-24 16:07:45 +00:00
build.rs call: Fix crash when screensharing on MacOS (#28784) 2025-04-15 16:36:08 +00:00
Cargo.toml Move UI code from assistant_context_editor -> agent_ui (#33289) 2025-06-23 22:22:01 -07:00
LICENSE-GPL chore: Change AGPL-licensed crates to GPL (except for collab) (#4231) 2024-01-24 00:26:58 +01:00
RELEASE_CHANNEL Restore the default release channel (#23671) 2025-01-26 09:19:24 +00:00