keys

package
v0.18.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package keys holds bindings and help rendering shared by TUI components.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Legend

type Legend struct {
	// contains filtered or unexported fields
}

Legend renders primary bindings and an optional secondary row.

func NewLegend

func NewLegend() Legend

NewLegend returns a collapsed legend.

func (*Legend) HandleToggle

func (l *Legend) HandleToggle(msg tea.KeyMsg, hasSecondary bool) bool

HandleToggle expands or collapses the legend when the help key is pressed.

func (*Legend) SetWidth

func (l *Legend) SetWidth(width int)

SetWidth prevents the legend from wrapping beyond its allocated row.

func (*Legend) View

func (l *Legend) View(primary, secondary []key.Binding) string

View renders primary bindings and, when expanded, secondary bindings.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL