KeymapEditor view
Coordinates one recorder over caller-owned keymap rows; it never applies a binding.
A view survives a frame. Hold it in an Entity with cx.new(..) and reach it with .update(..).
use gpui_kit::controls::KeymapEditor;
Construct
new(ident: impl Into<Ident>, window: &mut Window, cx: &mut Context<Self>) -> SelfOptions
Chain onto the value.
commands(commands: impl IntoIterator<Item = KeymapCommand>) -> Self
query(query: impl Into<SharedString>) -> SelfCommands
Need a Context, so they need a view.
set_commands(commands: Vec<KeymapCommand>, cx: &mut Context<Self>)
set_query(query: impl Into<SharedString>, cx: &mut Context<Self>)
set_disabled(disabled: bool, cx: &mut Context<Self>)Queries
Only answer; they change nothing.
active_command() -> Option<&SharedString>
current_commands() -> &[KeymapCommand]Reports
The variants of the event it emits. It never applies the change itself.
- AddCaptured
- Remove
- Reset
- RecordingCancelled
Rendered by
Each of these compiles and is captured by the gate, so the code behind them is verified rather than written.