Skip to content

PowerShell on (Debian) Linux messes up numeric keypad support #10511

@Zastai

Description

@Zastai

Steps to reproduce

  1. Open an ssh connection using PuTTY (keypad setting is "Normal", login shell is bash)
  2. Ensure the numeric keypad works (0-9, /*-+. and Enter)
  3. Run pwsh
  4. Try the numeric keypad keys again
  5. Exit pwsh (whether via Ctrl-D or exit)
  6. Try the numeric keypad keys once more

Expected behavior

  1. Keypad keys work the same in pwsh as in bash (just like they do in ksh, dash, ...)
  2. Keypad keys still work when returning to bash from pwsh

Actual behavior

  1. Only the Enter key works normally. /*- do nothing, + inserts l, and 0-9 insert p-y.
  2. All keypad keys (including Enter are non-functional in bash when returning from pwsh.

That PowerShell doesn't handle the keypad is one thing, but that it messes it up for everyone else is Real Bad(tm). It also means that it's not a case of just reading things differently - it seems to be changing the tty's mode without changing it back on exit.

Environment data

Name                           Value
----                           -----
PSVersion                      6.2.2
PSEdition                      Core
GitCommitId                    6.2.2
OS                             Linux 4.19.0-5-amd64 #1 SMP Debian 4.19.37-3 (2019-05-15)
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions