Skip to content

Commit 2e0dc62

Browse files
authored
chore(examples): views: change KeyMsg to KeyPressMsg in Update function (#1611)
1 parent d1ec982 commit 2e0dc62

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/views/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (m model) Init() tea.Cmd {
8282
// Main update function.
8383
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
8484
// Make sure these keys always quit
85-
if msg, ok := msg.(tea.KeyMsg); ok {
85+
if msg, ok := msg.(tea.KeyPressMsg); ok {
8686
k := msg.String()
8787
if k == "q" || k == "esc" || k == "ctrl+c" {
8888
m.Quitting = true

0 commit comments

Comments
 (0)