forked from Mirrors/bubbletea
handle "q" for quitting in list-simple example (#839)
This commit is contained in:
parent
2d81a48614
commit
8f3464a756
|
@ -67,7 +67,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||
|
||||
case tea.KeyMsg:
|
||||
switch keypress := msg.String(); keypress {
|
||||
case "ctrl+c":
|
||||
case "q", "ctrl+c":
|
||||
m.quitting = true
|
||||
return m, tea.Quit
|
||||
|
||||
|
|
Loading…
Reference in New Issue