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

Windows 1809: Shift + Space no longer produces a space on the console #282

Closed
alexbass112 opened this issue Oct 11, 2018 · 6 comments
Closed
Labels
Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Product-Powershell Issues in the modern command interpreter, Powershell.exe. Resolution-External For issues that are outside this codebase

Comments

@alexbass112
Copy link

Windows Build Number: Microsoft Windows [Version 10.0.17763.1]

Pressing the space bar while holding down the shift key no longer types a space on the console. This is inconsistent with prior versions of the console and most other text input fields. I've noticed this especially when typing out PowerShell commands that contain pipes or single-character aliased cmdlets.

For example, if I intend to type:

Get-Process | % Id

when typing fast and holding the shift key down throughout the entire ' | % ' sequence, the end result is:

Get-Process|%Id

Which is an invalid command.

@DHowett-MSFT
Copy link
Contributor

DHowett-MSFT commented Oct 11, 2018

This is a (known) regression in PSReadline, PowerShell/PSReadLine#719, which was updated in 1809. That regression was fixed with PowerShell/PSReadLine@3229956. Unfortunately, the console team doesn't control the speed at which PSReadline is ingested into the OS.

@SteveL-MSFT may know more.

There's a clever workaround that you can insert into your PowerShell profile to work around it in the meantime.

# Work around an RS5/PSReadline-2.0.0+beta2 bug (Spacebar is not marked 'essential')
Set-PSReadlineKeyHandler "Shift+SpaceBar" -ScriptBlock {
        [Microsoft.Powershell.PSConsoleReadLine]::Insert(' ')
}

@DHowett-MSFT DHowett-MSFT added Issue-Question For questions or discussion Product-Powershell Issues in the modern command interpreter, Powershell.exe. Resolution-External For issues that are outside this codebase labels Oct 11, 2018
@alexbass112
Copy link
Author

Great, thanks for the very fast response.

@SteveL-MSFT
Copy link
Member

PSReadLine in Windows will be updated for next release of Windows. In the interim, it appears the fix for this is in the beta.3 release which you can install from PowerShellGallery today.

install-module psreadline -scope currentuser -allowprerelease -allowclobber -force

@thw0rted
Copy link

thw0rted commented Jul 29, 2020

This is still happening on 1909. @SteveL-MSFT did the fix not wind up in the "next release" as planned? I'm on Microsoft branded hardware (Surface Book 2) with no available Windows updates showing.

(If it's not in the current release, and the terminal team doesn't control when the PSReadLine package gets updated, who does control that?)

ETA: this Superuser post suggests it was fixed at one point, then re-broken?

@akhan3
Copy link

akhan3 commented Jul 29, 2020

This bug is also affecting Windows 10 Pro version 2004 (build 19041.388). This issue should be reopened.

@DHowett
Copy link
Member

DHowett commented Jul 29, 2020

I am not reopening a bug that's doesn't represent something my team can fix. If you have a grievance, please move it to the PSReadline repository.

@microsoft microsoft locked as resolved and limited conversation to collaborators Jul 29, 2020
@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Jul 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Issue-Question For questions or discussion Needs-Tag-Fix Doesn't match tag requirements Product-Powershell Issues in the modern command interpreter, Powershell.exe. Resolution-External For issues that are outside this codebase
Projects
None yet
Development

No branches or pull requests

6 participants