MCPcopy
hub / github.com/yorukot/superfile / TeaRuneKeyMsg

Function TeaRuneKeyMsg

src/pkg/utils/tea_utils.go:5–11  ·  view source on GitHub ↗
(msg string)

Source from the content-addressed store, hash-verified

3import tea "charm.land/bubbletea/v2"
4
5func TeaRuneKeyMsg(msg string) tea.KeyPressMsg {
6 runes := []rune(msg)
7 if len(runes) == 1 {
8 return tea.KeyPressMsg{Code: runes[0], Text: msg}
9 }
10 return tea.KeyPressMsg{Code: tea.KeyExtended, Text: msg}
11}

Callers 15

TestFileCreationFunction · 0.92
testPanelOperationsFunction · 0.92
testModelScrollingFunction · 0.92
SendKeyMethod · 0.92
SendKeyDirectlyMethod · 0.92
TestQuitFunction · 0.92
TestChooserFileFunction · 0.92

Calls

no outgoing calls

Tested by 14

TestFileCreationFunction · 0.74
testPanelOperationsFunction · 0.74
testModelScrollingFunction · 0.74
TestQuitFunction · 0.74
TestChooserFileFunction · 0.74
TestZoxideFunction · 0.74
TestFilePanelNavigationFunction · 0.74