Skip to content

Console.ReadKey returns incomplete information for some key sequences on Linux #802

@lzybkr

Description

@lzybkr

AB#1115513
Using PowerShell 6.0.0-alpha.10 on Ubuntu 14.04, I run

PS> [Console]::ReadKey()

and type Ctrl-@. I get back

KeyChar Key Modifiers
------- --- ---------
        0   0

I see somewhat similar results with other key presses like Ctrl-! or Ctrl-%. In some cases, KeyChar has the correct key, but Modifiers is still 0, resulting in incorrectly assuming Ctrl was not down and e.g. inserting a ! instead of doing whatever action Ctrl+! was bound to.

This issue affects some of the key bindings in PSReadline.

Metadata

Metadata

Labels

Cost:SWork that requires one engineer up to 1 weekPriority:2Work that is important, but not critical for the releaseTeam:Librariesarea-System.Console

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions