(key string)
| 59 | ID: 101, |
| 60 | Summary: "Meeting notes", |
| 61 | CreatedAt: time.Date(2025, 3, 1, 9, 0, 0, 0, time.UTC), |
| 62 | Seen: true, |
| 63 | Creator: mail.Contact{Name: "Bob"}, |
| 64 | }, |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func keyPress(key string) tea.KeyPressMsg { |
| 69 | k := tea.Key{Text: key} |
| 70 | switch key { |
| 71 | case "ctrl+c": |
| 72 | k = tea.Key{Code: 'c', Mod: tea.ModCtrl} |
| 73 | case "esc": |
| 74 | k = tea.Key{Code: tea.KeyEscape} |
| 75 | case "enter": |
| 76 | k = tea.Key{Code: tea.KeyEnter} |
| 77 | case "tab": |
| 78 | k = tea.Key{Code: tea.KeyTab} |
| 79 | case "shift+tab": |
| 80 | k = tea.Key{Code: tea.KeyTab, Mod: tea.ModShift} |
| 81 | case "left": |
| 82 | k = tea.Key{Code: tea.KeyLeft} |
| 83 | case "right": |
| 84 | k = tea.Key{Code: tea.KeyRight} |
| 85 | case "up": |
| 86 | k = tea.Key{Code: tea.KeyUp} |
| 87 | case "down": |
no outgoing calls
no test coverage detected