KeyChar should be preserved for Ctrl+Letter#75853
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-console Issue DetailsThis PR restores the .NET 6 behavior for Ctrl+Letter key combinations, which is what Windows does as well. fixes #75795
|
|
/backport to release/7.0-rc2 |
|
Started backporting to release/7.0-rc2: https://github.com/dotnet/runtime/actions/runs/3085454024 |
|
Why was this case special? Can we think of any other possible similar special cases (or should we look for any) -- do we have good reason to believe this is the only bug of this sort? |
When I was implementing the new key parser, I assumed that Example: User presses I assumed it was Linux-specific thing, and just assigned default value to KeyChar. I was wrong, as it turned out that Windows also preserves the KeyChar for Ctrl+Letter combinations. I don't know why and what is the benefit of it.
Yes,
No, because there are plenty of key combinations and since I was the only person who tested it so far, I was testing my own implementation and assumptions, which as we can see turned out to be wrong in some cases. I am actually happy that PowerShell reported this bug as it means that they have performed objective testing. Don't forget that we have introduced a new config switch and the users can always switch to .NET 6 parser. |
This PR restores the .NET 6 behavior for Ctrl+Letter key combinations, which is what Windows does as well.
It does so only when Alt key was not pressed at the same time:
Windows Terminal:
cmd.exe:
fixes #75795