chore(examples): views: change KeyMsg to KeyPressMsg in Update function (#1611)

This commit is contained in:
jjpinto 2026-04-13 10:43:59 -04:00 committed by GitHub
parent d1ec9826ad
commit 2e0dc62319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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