sessiontui

package
v1.0.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultKeyMap = KeyMap{
	NextOption: key.NewBinding(
		key.WithKeys("tab"),
		key.WithHelp("tab", "next option"),
	),
	Up: key.NewBinding(
		key.WithKeys("up"),
		key.WithHelp("↑", "move up"),
	),
	Down: key.NewBinding(
		key.WithKeys("down"),
		key.WithHelp("↓", "move down"),
	),
	Submit: key.NewBinding(
		key.WithKeys("enter"),
		key.WithHelp("⏎", "submit answer"),
	),
	Help: key.NewBinding(
		key.WithKeys("ctrl+h"),
		key.WithHelp("ctrl+h", "toggle additional help"),
	),
	Quit: key.NewBinding(
		key.WithKeys("ctrl+q", "ctrl+c"),
		key.WithHelp("ctrl+q", "quit"),
	),
}

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	NextOption key.Binding
	Up         key.Binding
	Down       key.Binding
	Submit     key.Binding
	Help       key.Binding
	Quit       key.Binding
}

func (KeyMap) FullHelp

func (k KeyMap) FullHelp() [][]key.Binding

func (KeyMap) ShortHelp

func (k KeyMap) ShortHelp() []key.Binding

type Model

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

func InitialModel

func InitialModel(sessionConfigPath, vocabListPath string, numberOfQuestions, serverPort int) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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