-
Notifications
You must be signed in to change notification settings - Fork 5k
On Linux, the KeyChar
of the ConsoleKeyInfo
returned from Ctrl+c
becomes \0
with .NET 7-RC.1
#75795
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
Comments
Tagging subscribers to this area: @dotnet/area-system-console Issue DetailsDescriptionThis is a regression in .NET 7-RC1 to previous .NET versions, such as .NET 7-preview.7 and .NET 6 On Linux, with .NET 7-RC1, the Note that, on Windows, with either .NET 7-RC1 or previous .NET versions, the value of This prevents Ctrl+c from working in PowerShell running on .NET 7-RC.1 Reproduction StepsUsing PowerShell 7.3.0-preview.8, which is built against .NET SDK 7.0.100-rc.1.22431.12, on Ubuntu 18.04.
Expected behaviorFor Ctrl+c, the returned
Actual behavior
Regression?Yes. It's a regression in .NET 7-RC1 to previous .NET versions, including .NET 7-preview versions and .NET 6. Known WorkaroundsNo known workaround. Configuration
.NET SDK 7.0.100-rc.1.22431.12
Ubuntu 18.04, WSLv2. x64 Other informationPowerShell 7.3.0-preview.8 runs on top of .NET 7-RC.1 PowerShell 7.3.0-preview.7 runs on top of .NET 7-preview.7 PowerShell 7.2.6 runs on top of the latest .NET 6
|
/cc @adamsitnik for visibility. |
This issue blocks PS7.3 release with .NET7-rc1 |
Description
This is a regression in .NET 7-RC1 to previous .NET versions, such as .NET 7-preview.7 and .NET 6
On Linux, with .NET 7-RC1, the
ConsoleKeyInfo
returned fromConsole.ReadKey($true)
when pressing Ctrl+c has the value\0
for theKeyChar
property. With the previous .NET versions. the value ofKeyChar
for the same operation is(char)3
.Note that, on Windows, with either .NET 7-RC1 or previous .NET versions, the value of
KeyChar
for the same operation is always(char)3
.This prevents Ctrl+c from working in PowerShell running on .NET 7-RC.1
Reproduction Steps
Using PowerShell 7.3.0-preview.8, which is built against .NET SDK 7.0.100-rc.1.22431.12, on Ubuntu 18.04.
The
TERM
env var isxterm-256color
, but you get the same result when setting theTERM
torxvt
.Expected behavior
For Ctrl+c, the returned
ConsoleKeyInfo
should haveKeyChar
with the value(char)3
.The
TERM
env var isxterm-256color
Actual behavior
Regression?
Yes. It's a regression in .NET 7-RC1 to previous .NET versions, including .NET 7-preview versions and .NET 6.
Known Workarounds
No known workaround.
Configuration
.NET SDK 7.0.100-rc.1.22431.12
Microsoft.NETCore.App 7.0.0-rc.1.22426.10
Host Version: 7.0.0-rc.1.22426.10
Ubuntu 18.04, WSLv2. x64
Other information
PowerShell 7.3.0-preview.8 runs on top of .NET 7-RC.1
PowerShell 7.3.0-preview.7 runs on top of .NET 7-preview.7
PowerShell 7.2.6 runs on top of the latest .NET 6
The text was updated successfully, but these errors were encountered: