Skip to content
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

Keyboard not working with RDP windows host using iOS on pwsh 7.0.0 #1428

Closed
schmimps opened this issue Mar 21, 2020 · 21 comments · Fixed by #2632
Closed

Keyboard not working with RDP windows host using iOS on pwsh 7.0.0 #1428

schmimps opened this issue Mar 21, 2020 · 21 comments · Fixed by #2632
Assignees
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Fixed

Comments

@schmimps
Copy link

schmimps commented Mar 21, 2020

Steps to reproduce

On iOS, use any iOS RDP app (ms Remote Desktop or Parallels client for example) to access a Windows 10 64bits host. Open Powershell 7.0.0 and type anything. Keyboard doesn’t work. It works with Powershell 6.4 for example as for any other application

The command #1428 (comment) indicates this is a regression in newer version of PSReadLine (or .NET Core 3.1).

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
@daxian-dbw
Copy link
Member

@schmimps Can you please try start PowerShell 7 by pwsh -NonInteractive? The PSReadLine module won't be loaded when starting like this. Can you try and see if keyboard works when starting pwsh that way?

@schmimps
Copy link
Author

@daxian-dbw You're right, thanks! It works with pwsh -NonInteractive. Will it alway work this way or do you know if this issue will be solved?
For information, I downgraded to 6.2.4 and the keyboard was working without -NonInteractive. Then I upgraded to 7.0.0 and the keyboard didn't work until I added the flag.

@schmimps
Copy link
Author

@daxian-dbw I tried further with the NonIteractive option. The problem is that I cannot use scripts that ask for something. I can write inside the console, but as soon as I launch a script that asks for an answer, I have an error telling: "PowerShell is in NonInteractive mode. Read and Prompt functionality is not available."

@daxian-dbw
Copy link
Member

Thanks @schmimps for trying it out. That's just a way to confirm the issue is related to PSReadLine.
I will transfer this issue to the PSReadLine repo for further investigation.

@daxian-dbw daxian-dbw transferred this issue from PowerShell/PowerShell Mar 26, 2020
@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Mar 26, 2020
@daxian-dbw daxian-dbw added Needs-More Investigation Initial investigation is done, but need to follow up. and removed Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. labels Apr 21, 2020
@dgoldman-msft
Copy link

dgoldman-msft commented Aug 19, 2020

I am able to reproduce this on Mac OS High Sierra connecting to Windows 10 64 bit Version 2004 (oS Build 19041.450). Removing PSReadline however does correct the issue. If i downgrade to PSReadline 2.0.0 the problem goes away, it is present on 2.0.2

c:> $PSVersionTable

Name Value


PSVersion 5.1.19041.1
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.1
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

@daxian-dbw, and way to add this issue? I have a confirmed sustainable repro.

@daxian-dbw
Copy link
Member

Chatted with @dgoldman-msft offline and it looks this is a regression from 2.0.1 to 2.0.0.

@daxian-dbw daxian-dbw added Issue-Bug It either shouldn't be doing this or needs an investigation. Priority and removed Needs-More Investigation Initial investigation is done, but need to follow up. labels Aug 31, 2020
@OchoaJason
Copy link

I am also running into this issue with powershell 7.1.3 when I RDP to the system using ARM WVD Web Client. I do not get the issue when I RDP using the 'Remote Desktop' modern app. I tried upgrading PSReadLine to 2.2.0-beta and that did not fix the issue. Removing the PSReadLine module resolved the issue for both PowerShell (5.1.19041.906) and also pwsh.

@Bridug
Copy link

Bridug commented Jun 25, 2021

I experience this issue with 7.1.3 as well on a 4th Gen iPad Air, iPadOS 14.6 connecting via MS RDP app . PS7 will not take input from the magic keyboard or even the soft keyboard.

@SteveL-MSFT
Copy link
Member

SteveL-MSFT commented Jun 30, 2021

I'm able to repro this. The interesting thing is that if you use Windows Terminal, then PS7 w/ PSRL2.2 works fine, just not in the old conhost. Also, up arrow and enter works, just not alpha keys.

@dgoldman-msft
Copy link

dgoldman-msft commented Jun 30, 2021 via email

@SteveL-MSFT
Copy link
Member

I would suggest using Windows Terminal until we can figure out what changed between 2.0.0 and 2.0.1 that regressed this

@SteveL-MSFT
Copy link
Member

It appears the regression is between 2.0.0 and 1.2.0 and not between 2.0.0 and 2.0.1. This makes it a lot harder to track down the specific change as there were substantial changes between 1.2 and 2.0.

@SteveL-MSFT
Copy link
Member

Ok, figured out the problem. Seems like an easy fix. PR soon.

@SteveL-MSFT SteveL-MSFT self-assigned this Jul 1, 2021
@ghost ghost added the In-PR A PR is opened targeting the issue label Jul 1, 2021
@ghost ghost added Resolution-Fixed and removed In-PR A PR is opened targeting the issue labels Jul 1, 2021
@ghost
Copy link

ghost commented Oct 28, 2021

🎉 This issue was addressed in 2632, which has now been successfully released in v2.2.0-beta4. 🎉

@fplanque
Copy link

fplanque commented Oct 20, 2022

October 2022: still can't type into a Powershell on Windows 11 (fully up to date) when using Remote Desktop from mac.

Oddly enough, I can scroll through the history with arrow up & down , backspace/delete , CTRL+C also works but any printable character gets ignored.

Same with PowerShell 7.2.6.

@fplanque
Copy link

fplanque commented Oct 20, 2022

If this can help someone:

  • Workaround: In Remote Desktop Client, change Keyboard Mode to Scancode instead of Unicode and you can type...
  • Drawback: any keyboard differences (special chars) between Mac and PC standard keyboards will produce the wrong character. Good luck finding the backslash \ in Scancode mode ! :(

2022-10-20_23-48-50

@daxian-dbw
Copy link
Member

@fplanque Please make sure you are using the latest PSReadLine module (2.2.6 at the moment).
The PSReadLine shipped with PowerShell 7.2.6 is 2.1.0, which doesn't contain this fix.

@fplanque
Copy link

@daxian-dbw I would like to but I am a new user and I have no idea what the PSReadLine module is and how to update it. Can you point me into the right direction? Thank you.

@daxian-dbw
Copy link
Member

Open up the 7.2.6 PowerShell on you Win11 machine, then run the following command:

Install-Module PSReadLine -RequiredVersion 2.2.6 -Scope CurrentUser

Then start a new PowerShell session, and run the following command to verify the version of PSReadLine you are using:

Get-Module PSReadLine  ## you should see 2.2.6

@loaderladdy
Copy link

I have been looking for the answer to this problem for so long. The thread for this issue has made me so very happy.
Thank you all.
am now off to upgrade PSReadline on several computers.

@dvmbro
Copy link

dvmbro commented Feb 21, 2024

@daxian-dbw Thank you! Worked fabulously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Resolution-Fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants