handle "q" for quitting in list-simple example (#839)

This commit is contained in:
Sharun 2024-01-11 07:38:58 -08:00 committed by GitHub
parent 2d81a48614
commit 8f3464a756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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