[GH-ISSUE #880] tview application freezes with AddTextView form component specific configuration and keystroke capture #641

Open
opened 2026-03-04 01:06:41 +03:00 by kerem · 2 comments
Owner

Originally created by @WeBtOrY-ES on GitHub (Sep 4, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/880

Hi!

After injecting application and form as a parameters of a function tview.NewApplication(),tview.NewForm() as application *tview.Application, form *tview.Form

when you use this configuration of AddTextView

form.AddTextView("Server name", serverName, 20, 1, false, false)

and the Esc key is pressed

(captured with this code)

application.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { k := event.Key() if k == tcell.KeyEsc { escPressed = true application.Stop() } return event })

the application freezes.

However, with this configuration of AddTextView is used

form.AddTextView("Server name", serverName, 20, 1, false, true)

the application behaves as it should.

I don't know if is a expected behavior or is a bug.

Originally created by @WeBtOrY-ES on GitHub (Sep 4, 2023). Original GitHub issue: https://github.com/rivo/tview/issues/880 Hi! After injecting application and form as a parameters of a function `tview.NewApplication(),tview.NewForm()` as `application *tview.Application, form *tview.Form` when you use this configuration of AddTextView `form.AddTextView("Server name", serverName, 20, 1, false, false)` and the Esc key is pressed (captured with this code) `application.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey { k := event.Key() if k == tcell.KeyEsc { escPressed = true application.Stop() } return event })` the application freezes. However, with this configuration of AddTextView is used `form.AddTextView("Server name", serverName, 20, 1, false, true)` the application behaves as it should. I don't know if is a expected behavior or is a bug.
Author
Owner

@uqix commented on GitHub (Jul 18, 2025):

This issue still exists, when the ESC key is pressed in a form, the form focuses the first item which happens to be a TextView with scrollable set to false, then the app freezes.

<!-- gh-comment-id:3086566730 --> @uqix commented on GitHub (Jul 18, 2025): This issue still exists, when the `ESC` key is pressed in a form, the form focuses the **first item** which happens to be a `TextView` with `scrollable` set to `false`, then the app freezes.
Author
Owner

@asimfarooq5 commented on GitHub (Nov 20, 2025):

Keyboard input freezes after repeated navigation between two tview pages that update frequently.

<!-- gh-comment-id:3558510714 --> @asimfarooq5 commented on GitHub (Nov 20, 2025): Keyboard input freezes after repeated navigation between two tview pages that update frequently.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#641
No description provided.