chore(examples): views: change KeyMsg to KeyPressMsg in Update function (#1611)
This commit is contained in:
parent
d1ec9826ad
commit
2e0dc62319
1 changed files with 1 additions and 1 deletions
|
|
@ -82,7 +82,7 @@ func (m model) Init() tea.Cmd {
|
|||
// Main update function.
|
||||
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
// Make sure these keys always quit
|
||||
if msg, ok := msg.(tea.KeyMsg); ok {
|
||||
if msg, ok := msg.(tea.KeyPressMsg); ok {
|
||||
k := msg.String()
|
||||
if k == "q" || k == "esc" || k == "ctrl+c" {
|
||||
m.Quitting = true
|
||||
|
|
|
|||
Loading…
Reference in a new issue