Skip to content

Component KeybindingInput

MeowLynxSea edited this page Jan 23, 2026 · 5 revisions

KeybindingInput

A shortcut / keybinding capture field.

Behavior:

  • Click to enter capture mode.
  • Press a key chord (e.g. ⌘⇧K) to commit.
  • Display uses UI symbols for modifiers.

Example

use gpui::ElementId;
use yororen_ui::component::keybinding_input;

let view = keybinding_input()
    .key(ElementId::from(("settings", "toggle_overlay")))
    .placeholder("Press keys…")
    .on_change(|binding, _window, _cx| {
        // binding: SharedString (already formatted for UI)
    });

Clone this wiki locally