(msg string)
| 3 | import tea "charm.land/bubbletea/v2" |
| 4 | |
| 5 | func 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 | } |
no outgoing calls