1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

tui, added ctrl+c to exit

This commit is contained in:
postmannen 2022-01-18 10:48:23 +01:00
parent c5d0fda33b
commit 348b7b2d63

3
tui.go
View file

@ -71,6 +71,9 @@ func (t *tui) Start(ctx context.Context, toRingBufferCh chan []subjectAndMessage
case tcell.KeyF3:
pages.SwitchToPage("info")
return nil
case tcell.KeyCtrlC:
app.Stop()
log.Printf("info: detected ctrl+c, stopping TUI\n")
}
return event
})