-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
[BUG] Input fields get random symbols like "[B[AA1" or "B" and others pasted in on every action #136
Comments
Hello, what kind of terminal emulator are you using? |
In particular, what sequence of byte it sent when you are using the example ./example/util/print_key_press You should get those numbers:
You can try it online against the xterm.js terminal emulator and check you receive the same sequences: |
It changes how extreme it is, sometimes even more symbols than here get pasted in. https://streamable.com/mg7g85 |
Windows CMD. I have tried PowerShell, but the same. |
@ArthurSonzogni we are working on the same project btw, so i m using Windows CMD too. Btw, its not the same symbols your https://arthursonzogni.com/FTXUI/examples/?file=./util/print_key_press.js shows me |
@ArthurSonzogni, do u have any idea? |
I finally was able to test on Windows. However I was not able to reproduce your problems. I just saw you made a video. This help a lot. Thanks! |
What should we do now? If you check my github account, you can find my project called "PW-Manager" clone it and run it, you ll see the errors too |
I tried locally on "gallery.exe", using visual studio. It seems to be working. Maybe this is caused by your project? Then I should try directly your project. |
I have tried the same project on Linux, but it works well. |
would be awesome if you could try to open it directly, we have one global screen which the requested file renders to, maybe this could be a problem. |
@ArthurSonzogni, i ve tried it on windows with the ubuntu cmd and it had the same problems |
Sorry =, It was very painful for me to try your project. First install windows, then visual studio, then git, then cmake. Then discover I need vcpkg. Then discover SQLite3 was missing. Then trying to use vcpkg to install SQLite3, which errors because I apparently need to install the "english" language pack. Then install the english language pack for visual studio. Trying again installing SQLite. Then trying again cmake with the error:`
I have to abandon trying to build your project. Next time, you probably want to abandon vcpkg and directly use cmake fetchcontent for building from source everything you need. I will take a look at your source code directly instead of trying to reproduce your problem. |
If i can help you in any way, just tell me. Thanks for your quick replys btw |
Sorry, I looked too quickly. You don't use vcpkg and the missing file in lib/clip is just because I need to ask git to clone recursively. |
so does it work now? |
@ArthurSonzogni you can use "git update submodule --init --recursive" |
Yes, I just tried on Linux. Working very well. Nice app! |
Thanks for your positive feedback, would be awesome if you could help us with also getting it working on windows |
@ArthurSonzogni |
|
I guess that's because of this file: |
This is a binary file with the latest changes of FTXUI. |
Okay, I found it. What you see are the windows terminal replying to the request about reporting the cursor position relatively to the screen. This isn't really useful in fullscreen mode, because it will always report (1,1). This is useful with ScreenInteractive::TerminalOutput() for instance. So the windows terminal should output
I will add one more time "mitigation" so that this bug won't affect FTXUI most of the time. |
Okay, thank you for your time and efforts @ArthurSonzogni |
this is awesome, thanks a lot. Would it reduce it a lot, like 90% or smth or would it just help a little? When do you think u'll have the time to implement it? |
I finally got access to a computer using the Microsoft's Windows OS. That's the opportunity to find and mitigate all the problems encountered. This patch: 1. Introduce an option and a C++ definition to enable fallback for Microsoft's terminal emulators. This allows me to see/test the Microsoft output from Linux. This also allows Windows users to remove the fallback and target non Microsoft terminals on Windows if needed. 2. Microsoft's terminal suffer from a race condition bug when reporting the cursor position: #136 The mitigation is not to ask for the cursor position in fullscreen mode where it isn't really needed and request it less often. This fixes: #136 3. Microsoft's terminal do not handle properly hidding the cursor. Instead the character under the cursor is hidden, which is a big problem. As a result, we don't enable setting the cursor to the best position for [input method editors](https://en.wikipedia.org/wiki/Input_method), It will be displayed at the bottom right corner. See: - microsoft/terminal#1203 - microsoft/terminal#3093 4. Microsoft's terminals do not provide a way to query if they support colors. As a fallback, assume true colors is supported. See issue: - microsoft/terminal#1040 This mitigates: - #135 5. The "cmd" on Windows do not properly report its dimension. Powershell works correctly. As a fallback, use a 80x80 size instead of 0x0. 6. There are several dom elements and component displayed incorrectly, because the font used is missing several unicode glyph. Use alternatives or less detailled one as a fallback.
I finally got access to a computer using the Microsoft's Windows OS. That's the opportunity to find and mitigate all the problems encountered. This patch: 1. Introduce an option and a C++ definition to enable fallback for Microsoft's terminal emulators. This allows me to see/test the Microsoft output from Linux. This also allows Windows users to remove the fallback and target non Microsoft terminals on Windows if needed. 2. Microsoft's terminal suffer from a race condition bug when reporting the cursor position: microsoft/terminal#7583. The mitigation is not to ask for the cursor position in fullscreen mode where it isn't really needed and request it less often. This fixes: #136 3. Microsoft's terminal do not handle properly hidding the cursor. Instead the character under the cursor is hidden, which is a big problem. As a result, we don't enable setting the cursor to the best position for [input method editors](https://en.wikipedia.org/wiki/Input_method), It will be displayed at the bottom right corner. See: - microsoft/terminal#1203 - microsoft/terminal#3093 4. Microsoft's terminals do not provide a way to query if they support colors. As a fallback, assume true colors is supported. See issue: - microsoft/terminal#1040 This mitigates: - #135 5. The "cmd" on Windows do not properly report its dimension. Powershell works correctly. As a fallback, use a 80x80 size instead of 0x0. 6. There are several dom elements and component displayed incorrectly, because the font used is missing several unicode glyph. Use alternatives or less detailled one as a fallback.
@ArthurSonzogni, thanks for your help! Btw, one more off topic question. Do you provide any way to mask input? for example passwords? |
I finally got access to a computer using the Microsoft's Windows OS. That's the opportunity to find and mitigate all the problems encountered. This patch: 1. Introduce an option and a C++ definition to enable fallback for Microsoft's terminal emulators. This allows me to see/test the Microsoft output from Linux. This also allows Windows users to remove the fallback and target non Microsoft terminals on Windows if needed. 2. Microsoft's terminal suffer from a race condition bug when reporting the cursor position: microsoft/terminal#7583. The mitigation is not to ask for the cursor position in fullscreen mode where it isn't really needed and request it less often. This fixes: #136 3. Microsoft's terminal do not handle properly hidding the cursor. Instead the character under the cursor is hidden, which is a big problem. As a result, we don't enable setting the cursor to the best position for [input method editors](https://en.wikipedia.org/wiki/Input_method), It will be displayed at the bottom right corner. See: - microsoft/terminal#1203 - microsoft/terminal#3093 4. Microsoft's terminals do not provide a way to query if they support colors. As a fallback, assume true colors is supported. See issue: - microsoft/terminal#1040 This mitigates: - #135 5. The "cmd" on Windows do not properly report its dimension. Powershell works correctly. As a fallback, use a 80x80 size instead of 0x0. 6. There are several dom elements and component displayed incorrectly, because the font used is missing several unicode glyph. Use alternatives or less detailled one as a fallback.
This doesn't exist, but I believe I should add an option for that: |
Input fields get random symbols like "[B[AA1" or "B" and others pasted in on every action like typing, using the arrow keys and moving the mouse
The text was updated successfully, but these errors were encountered: