MCPcopy Create free account
hub / github.com/cli/cli / KeyBinds

Method KeyBinds

internal/prompter/multi_select_with_search.go:406–420  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

404}
405
406func (m *multiSelectSearchField) KeyBinds() []key.Binding {
407 if m.mode == msModeSearch {
408 return []key.Binding{
409 key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "search")),
410 key.NewBinding(key.WithKeys("shift+tab"), key.WithHelp("shift+tab", "back")),
411 }
412 }
413 return []key.Binding{
414 key.NewBinding(key.WithKeys("x"), key.WithHelp("x", "toggle")),
415 key.NewBinding(key.WithKeys("up"), key.WithHelp("↑", "up")),
416 key.NewBinding(key.WithKeys("down"), key.WithHelp("↓", "down")),
417 key.NewBinding(key.WithKeys("shift+tab"), key.WithHelp("shift+tab", "search")),
418 key.NewBinding(key.WithKeys("enter"), key.WithHelp("enter", "confirm")),
419 }
420}
421
422func (m *multiSelectSearchField) WithTheme(theme huh.Theme) huh.Field {
423 if m.theme != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected