Type SubmenuCommand

type SubmenuCommand uint8

SubmenuCommand is the level movement a key asks for.

Constants

const (
	SubmenuCommandNone SubmenuCommand = iota
	// SubmenuCommandOpen opens the focused row's submenu (ArrowRight).
	SubmenuCommandOpen
	// SubmenuCommandClose closes the current submenu and returns to its row
	// (ArrowLeft).
	SubmenuCommandClose
)

Constructors

SubmenuCommandForKey#

func SubmenuCommandForKey(key ui.Key) (SubmenuCommand, bool)

SubmenuCommandForKey maps the horizontal menu keys Base UI uses for submenu levels: Right opens, Left closes. The application moves focus after it acts: Right focuses the first row of the submenu, Left the row that opened it.