-
-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lost a key event once when exiting or suspending in v2.2.1. #452
Comments
noborus
added a commit
to noborus/tcell
that referenced
this issue
Apr 25, 2021
fixed gdamore#452. When switching nonBlocking, a dummy input is sent to process read and clear the read block.
tslocum
added a commit
to tslocum/tcell
that referenced
this issue
Apr 25, 2021
tslocum
added a commit
to tslocum/tcell
that referenced
this issue
Apr 25, 2021
Argh. There is no way to win. Some want /dev/tty. But that has warts like this. I may go back to stdin and give an alternative api for the few folks who don’t agree with that approach.
Get Outlook<https://aka.ms/qtex0l> for iOS
…________________________________
From: Noboru Saito ***@***.***>
Sent: Sunday, April 25, 2021 8:33:34 AM
To: gdamore/tcell ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [gdamore/tcell] Lost a key event once when exiting or suspending in v2.2.1. (#452)
For example, _demos/mouse.go.
It didn't finish until I pressed the ESC key twice and then pressed any key (or moving the mouse cursor)
(same for suspend).
The cause is that a read block occurs in the inputLoop of tscreen.go.
func (t *tScreen) inputLoop(stopQ chan struct{}) {
defer t.wg.Done()
for {
select {
case <-stopQ:
return
default:
}
chunk := make([]byte, 128)
n, e := t.in.Read(chunk) // <------ block
(In v2.2.0, it was os.Stdin, so it could be finished.)
I'm trying on Linux (Ubuntu).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#452>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAJ4G7OWU2SLK4QBIYHUGL3TKQY45ANCNFSM43RMRHCA>.
|
Please see the tty branch for a possible fix. |
gdamore
added a commit
that referenced
this issue
May 15, 2021
fixes #449 Lost keyboard input after suspend on Windows 10 PowerShell fixes #148 Make tcell usable with any io.Reader and io.Writer This introduces a new Tty interface so that applications can supply their own implementation. This should facilitate work for applications that wish to provide e.g. a webasm version of the terminal, or that need to use different kinds of file plumbing.
Thank you very much. |
noborus
added a commit
to noborus/ov
that referenced
this issue
May 17, 2021
The issue at gdamore/tcell#452 has been resolved, so I updated to 2.3.1.
Merged
zyedidia
pushed a commit
to micro-editor/tcell
that referenced
this issue
Jun 24, 2021
hhirtz
added a commit
to hhirtz/senpai
that referenced
this issue
Aug 6, 2021
tcell 2.2.1 has a bug [0][1][2] that made senpai need a keypress after Ctrl-C was hit. [0] gdamore/tcell#452 [1] gdamore/tcell#454 [2] gdamore/tcell@7694d90
zyedidia
pushed a commit
to micro-editor/tcell
that referenced
this issue
Feb 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For example, _demos/mouse.go.
It didn't finish until I pressed the ESC key twice and then pressed any key (or moving the mouse cursor)
(same for suspend).
The cause is that a read block occurs in the inputLoop of tscreen.go.
(In v2.2.0, it was os.Stdin, so it could be finished.)
I'm trying on Linux (Ubuntu).
The text was updated successfully, but these errors were encountered: