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

Created on 12 Oct 2018  路  6Comments  路  Source: microsoft/terminal

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.

Issue-Question Needs-Tag-Fix Product-Powershell Resolution-External

Most helpful comment

This is a (known) regression in PSReadline, lzybkr/PSReadLine#719, which was updated in 1809. That regression was fixed with lzybkr/PSReadline@3229956a1973ffe65c24dbbe9ba421e62bcbf0b3. 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(' ')
}

All 6 comments

This is a (known) regression in PSReadline, lzybkr/PSReadLine#719, which was updated in 1809. That regression was fixed with lzybkr/PSReadline@3229956a1973ffe65c24dbbe9ba421e62bcbf0b3. 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(' ')
}

Great, thanks for the very fast response.

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

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?

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pingzing picture pingzing  路  212Comments

CobusKruger picture CobusKruger  路  60Comments

dhavalhirdhav picture dhavalhirdhav  路  56Comments

migueldeicaza picture migueldeicaza  路  58Comments

privacyguy123 picture privacyguy123  路  131Comments