Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Console.Readkey() behaviour differences between platforms not documented. #7543

Open
@SpaceBeeGaming

Description

@SpaceBeeGaming

Issue description
Console.ReadKey(true).Key with Numpad keys behaves differently between Windows and Linux. This should be documented.

For example:
Console.WriteLine(Console.ReadKey(true).Key); Pressing the "Numpad 1" key:
On Windows returns NumPad1
On Linux (Ubuntu) returns D1 ie. the same as 1 on the number row.

This behavioral difference should be mentioned in the docs since it caused quite a bit of confusion.

Target framework

  • .NET Core - .NET 6.0.1
  • .NET Framework
  • .NET Standard
dotnet --info output or About VS info
.NET SDK (reflecting any global.json):
 Version:   6.0.101
 Commit:    ef49f6213a

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         ubuntu.20.04-x64
 Base Path:   /usr/share/dotnet/sdk/6.0.101/

Host (useful for support):
  Version: 6.0.1
  Commit:  3a25a7f1cc

.NET SDKs installed:
  6.0.101 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download```
</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-System.Consolehelp wantedGood for community contributors to help [up-for-grabs]

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions