Run UICatalogin WSLand quit. Try to type and it's hang and you have to close WSL. Do the same with the Exampleand you can type normally. May be it's related with Shutdownalready related before.
I can't repro this either in Windows Terminal with Ubuntu or ConEmu.
What terminal are you using?
That said, almost nothing else works in WSL for me. Tab key works to move between panes, but arrows don't nav. Hmm....
Also not working with CMD and WSL2.
Example has same issue for me.
I use the default WSL2 terminal. I'm not sure what which open. How can I check that? I'm going test in VMWare to see if it's fail too. It's all messed up. With the Ubuntu 20.04 I seen the Example is fail too.
Ahhh...
If I start it from bash it works fine (and exits fine). but if I run it from pwsh most keystrokes don't work (but it exits fine).
Weird thing is, ocgv works fine everywhere!
The hangs after quit only happens with the Net5.0. The mouse issues only happens with Ubuntu which has the libncurses 6.2 version.
Writing resetor stty sane, even if I can't see it, the terminal returns to normal. The problem is to code this in ncurses.
I already discovered what is causing this. Are the StartReportingMouseMovesand StopReportingMouseMovesmethods.
public override void StartReportingMouseMoves ()
{
Console.Out.Write ("\x1b[?1003h");
Console.Out.Flush ();
}
public override void StopReportingMouseMoves ()
{
Console.Out.Write ("\x1b[?1003l");
Console.Out.Flush ();
}
Commenting them the behavior issue stops but the problem it's the mouse movement also stops too.
I won't waste any more time on this problem because it only happens with Net5.0. With netcoreapp3.1 this problem does not happen, so until the final version of Net5.0 this problem can be corrected.
The problem still exists. I just tested with Net5.0 and gui.cs 1.0.0-pre.6 .
Yes indeed. But if you test with the NetDriverwith the Application.UseSystemConsole = true the hangs don't happens, neither on Windows, WSLor Linux.
I confirm that it does not hang any more. However, after I close the application and I use a mouse button in the terminal I get strange text like:
�,`�(`�(a�(a�(a�(a�(a�(`�-`�-`�.`�.a�.a�.a�.`�.`�.`�.`�.a�.a�.a�.a�.a�.a
on the terminal.
My environment is: Kubuntu 20.04, Konsole Version 19.12.3
Ah I see. I am using CSIin the Unixfor resizing and perhaps it is not clearing on exit.
Is this another bug or related? Shall I open another issue?
No, it is still under development in this PR #1021.
I just did a dotnet build -c Release && ./UICatalog/bin/Release/net5.0/UICatalog of 62b5800c84bb5b22935f2e63dc75db1b47bbadae on Ubuntu 20.04 gnome-terminal and after quitting the application, the terminal is fubar.
Comment the Application.HeightAsBuffer = true; or set Application.HeightAsBuffer = false; and see the difference, please. Thanks.
Tried both, but it did not fix the problem.
Can you post a print screen, please? Thanks.
Oh, I'm now noticing that I didn't explain the problem before... sorry! After the application quits, when I press the left (or right) cursor key, the cursor caret moves a whole word at a time instead of a character at a time. It seems the ctrl key is stuck. Hummm, I'm also noticing this after running the dotnet command... maybe this is a problem with the dotnet runtime? anyhow, whatever it is, its messing the terminal.
Its not just the left/right cursor keys; up/down are also messed up. I'm not sure if this will help anything, but this is my .inputrc file:
"\e[A": history-search-backward
"\e[B": history-search-forward
"\eOD": backward-word
"\eOC": forward-word
set show-all-if-ambiguous on
set completion-ignore-case on
Interesting enough, if I immediately open vim and quit it, the terminal cursor keys start working normally again.
Ah. Ok. The terminal is not restoring properly. It is a issue not solved yet.
To bypass this without close the terminal, I do:
Ctrl+C
reset
With Application.UseSystemConsole, running with the -usc argument that behaviour don't happens.