You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Console.ReadKey returns unexpected ConsoleKeyInfo when pressing Shift+End in WSL (v2 Ubuntu 20.04) #63644
When pressing Shift+End, [console]::ReadKey($true) returns Escape as the ConsoleKeyInfo value, and triggers the 1;2F input from terminal. This is on WSL v2 with Ubuntu 20.04. The value for environment variable TERM is xterm-256color.
Note that, Ctrl+End, Alt+End, Ctrl+Home, Alt+Home, and Shift+Home are all work as expected. For example, Shift+Home returns:
Reproduction Steps
Run [console]::ReadKey($true), for example, from PowerShell
Press the keystrokes Shift+End
Expected behavior
The returned ConsoleKeyInfo should be:
KeyChar Key Modifiers
------- --- ---------
End Shift
Actual behavior
returns Escape as the ConsoleKeyInfo value, and triggers the 1;2F input from terminal.
Regression?
Not sure. At least the same behavior is found on .NET 5 as well.
Activity