MCPcopy
hub / github.com/mathaou/termdbms / FocusCommand

Method FocusCommand

tuiutil/textinput.go:275–283  ·  view source on GitHub ↗

FocusCommand sets the Focus state on the model. When the model is in Focus it can receive keyboard input and the cursor will be hidden.

()

Source from the content-addressed store, hash-verified

273// FocusCommand sets the Focus state on the model. When the model is in Focus it can
274// receive keyboard input and the cursor will be hidden.
275func (m *TextInputModel) FocusCommand() tea.Cmd {
276 m.Focus = true
277 m.blink = m.cursorMode == CursorHide // show the cursor unless we've explicitly hidden it
278
279 if m.cursorMode == CursorBlink && m.Focus {
280 return m.blinkCmd()
281 }
282 return nil
283}
284
285// Blur removes the Focus state on the model. When the model is blurred it can
286// not receive keyboard input and the cursor will be hidden.

Callers 2

initFunction · 0.80
HandleKeyboardEventsFunction · 0.80

Calls 1

blinkCmdMethod · 0.95

Tested by

no test coverage detected