mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #243] Shutdown event watching should be configurable. #189
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#189
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @IngCr3at1on on GitHub (Feb 25, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/243
Currently in application.go.Run the following code block exists:
while this is appropriate for most applications there are some cases where the consuming application will want to change this behavior.
Possible solution 1:
add a var to the application struct:
KeyInterceptorF func(app Application, key tcell.Key)and provide a default value:
The above is partly incomplete but should give an idea of what I'm suggesting.
Possible solution 2:
simply add an easy way to disable the current check and leave calling stop entirely up to the consumer in that situation.
I would be happy to implement either of these myself.
@IngCr3at1on commented on GitHub (Feb 28, 2019):
After some extra fiddling it appears the behavior I want can be handled using app.SetInputCapture.
Closing