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
ratatui-minimal has strange behavior #14
Comments
also checked on mac, works fine. I tried to debug on windows (my main dev env) and it seemed that crossterm was generating extra events. This loop doesn't really involve ratatui. But maybe its something to do with how ratatui sets up crossterm, or what term.draw is doing
but I ran out of time to investigate further. I am away from my main dev env for 6 weeks, sorry I cannot add more info |
@pm100 key doubling problem occurs in vscode terminal, but not in pure, this is crossterm problem, as i think main reason - app reacts to Press and Release event both as one key event possible solution - check for event kind before action, like
|
I am on the road away from my windows dev box but I am pretty sure I was not in vs code terminal. I never use that for tui' development, I always have externalconsole set
…________________________________
From: MindMayhem ***@***.***>
Sent: Monday, May 1, 2023 9:29:31 PM
To: rhysd/tui-textarea ***@***.***>
Cc: pm100 ***@***.***>; Mention ***@***.***>
Subject: Re: [rhysd/tui-textarea] ratatui-minimal has strange behavior (Issue #14)
@pm100<https://github.com/pm100> key doubling problem occurs in vscode terminal, but not in, this is crossterm problem, as i think
but in usual cmd/powershell it doesnt doubled (idk why)
main reason - app reacts to Press and Release event both as one key event
possible solution - check for event kind before action, like
if let Event::Key(key) = event::read()? {
if key.kind == KeyEventKind::Press {
.....
}
}
—
Reply to this email directly, view it on GitHub<#14 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AADXOD5OYIULVMQKQUNFUDDXEAFJXANCNFSM6AAAAAAXGHKQ3Y>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
external console set can be a reason of input doubling
try to compile ur app and run in pure cmd/powershell
пн, 1 мая 2023 г., 22:54 pm100 ***@***.***>:
… I am on the road away from my windows dev box but I am pretty sure I was
not in vs code terminal. I never use that for tui' development, I always
have externalconsole set
________________________________
From: MindMayhem ***@***.***>
Sent: Monday, May 1, 2023 9:29:31 PM
To: rhysd/tui-textarea ***@***.***>
Cc: pm100 ***@***.***>; Mention ***@***.***>
Subject: Re: [rhysd/tui-textarea] ratatui-minimal has strange behavior
(Issue #14)
@pm100<https://github.com/pm100> key doubling problem occurs in vscode
terminal, but not in, this is crossterm problem, as i think
but in usual cmd/powershell it doesnt doubled (idk why)
main reason - app reacts to Press and Release event both as one key event
possible solution - check for event kind before action, like
if let Event::Key(key) = event::read()? {
if key.kind == KeyEventKind::Press {
.....
}
}
—
Reply to this email directly, view it on GitHub<
#14 (comment)>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/AADXOD5OYIULVMQKQUNFUDDXEAFJXANCNFSM6AAAAAAXGHKQ3Y
>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJNZSE6S72SAPFEPH7MRPYLXEAIHBANCNFSM6AAAAAAXGHKQ3Y>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Will do. But in fact I am sure that I did that too. Other oddity is that it works fine with tui, it's only ratatui that is wierd.
________________________________
From: MindMayhem ***@***.***>
Sent: Monday, May 1, 2023 11:01:01 PM
To: rhysd/tui-textarea ***@***.***>
Cc: pm100 ***@***.***>; Mention ***@***.***>
Subject: Re: [rhysd/tui-textarea] ratatui-minimal has strange behavior (Issue #14)
external console set can be a reason of input doubling
try to compile ur app and run in pure cmd/powershell
пн, 1 мая 2023 г., 22:54 pm100 ***@***.***>:
I am on the road away from my windows dev box but I am pretty sure I was
not in vs code terminal. I never use that for tui' development, I always
have externalconsole set
________________________________
From: MindMayhem ***@***.***>
Sent: Monday, May 1, 2023 9:29:31 PM
To: rhysd/tui-textarea ***@***.***>
Cc: pm100 ***@***.***>; Mention ***@***.***>
Subject: Re: [rhysd/tui-textarea] ratatui-minimal has strange behavior
(Issue #14)
@pm100<https://github.com/pm100> key doubling problem occurs in vscode
terminal, but not in, this is crossterm problem, as i think
but in usual cmd/powershell it doesnt doubled (idk why)
main reason - app reacts to Press and Release event both as one key event
possible solution - check for event kind before action, like
if let Event::Key(key) = event::read()? {
if key.kind == KeyEventKind::Press {
.....
}
}
—
Reply to this email directly, view it on GitHub<
#14 (comment)>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/AADXOD5OYIULVMQKQUNFUDDXEAFJXANCNFSM6AAAAAAXGHKQ3Y
>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJNZSE6S72SAPFEPH7MRPYLXEAIHBANCNFSM6AAAAAAXGHKQ3Y>
.
You are receiving this because you commented.Message ID:
***@***.***>
—
Reply to this email directly, view it on GitHub<#14 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AADXOD6EWYTRWP4BOWIYTBLXEAQA3ANCNFSM6AAAAAAXGHKQ3Y>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
the cause is this crossterm-rs/crossterm#745 i have a fix to the tui-textarea inut handling which I am testing. Will PR soon |
This should be fixed by 68f4e0d |
Here I simply ran it and typed hello world
It only fails on windows, works on linux (WSL unbuntu 20)
BTW - minimal (with tui) works fine
The text was updated successfully, but these errors were encountered: