Ctrl+Space in Powershell Core produces double quote character #8962

Closed
opened 2026-01-31 01:42:28 +00:00 by claunia · 5 comments
Owner

Originally created by @jwefers on GitHub (Jun 10, 2020).

Environment

Windows build number:  10.0.19041.0
Windows Terminal version (if applicable): 1.0.1402.0 (Preview from Store)
Locale: ENG language, DE keyboard (German)

Any other software?
Powershell Core 7.0.1, 7.1.0-preview.3

Steps to reproduce

Having a german keyboard, open PowerShell Core in Windows Terminal. Start with e.g. Get-, then Ctrl+Space.

Also, do the same for normal Windows Powershell 5.1.xxx

Expected behavior

The autocomplete Menu as it works in normal Powershell terminal shows up.

Actual behavior

In PS Core: double quote character is typed
In PS: nothing happens, but apparently, the terminal (? console host?) is registering something, as if i repeat it rapidly, the cursor does not blink but stays until i stop
(In WSL, also nothing happens, also registers something)

Originally created by @jwefers on GitHub (Jun 10, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.19041.0 Windows Terminal version (if applicable): 1.0.1402.0 (Preview from Store) Locale: ENG language, DE keyboard (German) Any other software? Powershell Core 7.0.1, 7.1.0-preview.3 ``` # Steps to reproduce Having a german keyboard, open PowerShell Core in Windows Terminal. Start with e.g. `Get-`, then Ctrl+Space. Also, do the same for normal Windows Powershell 5.1.xxx # Expected behavior The autocomplete Menu as it works in normal Powershell terminal shows up. # Actual behavior In PS Core: double quote character is typed In PS: nothing happens, but apparently, the terminal (? console host?) is registering something, as if i repeat it rapidly, the cursor does not blink but stays until i stop (In WSL, also nothing happens, also registers something)
claunia added the Issue-BugArea-InputResolution-DuplicateProduct-Conpty labels 2026-01-31 01:42:29 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Jun 16, 2020):

I'm hoping this will just magically go away with all the work that's been done for #4999 in Terminal 1.1.

@zadjii-msft commented on GitHub (Jun 16, 2020): I'm hoping this will just magically go away with all the work that's been done for #4999 in Terminal 1.1.
Author
Owner

@jwefers commented on GitHub (Jun 16, 2020):

Ah, i read that thread and what made me open this defect was your remark:
image
that is should already be fixed

@jwefers commented on GitHub (Jun 16, 2020): Ah, i read that thread and what made me open this defect was your remark: ![image](https://user-images.githubusercontent.com/851823/84796513-fe372b00-aff8-11ea-8e1a-732278b77733.png) that is should already be fixed
Author
Owner

@jwefers commented on GitHub (Jun 16, 2020):

What i just discover: The very same issue (" being typed), happens in the VS Code terminal:
image

not your turf probably but coincidence?

@jwefers commented on GitHub (Jun 16, 2020): What i just discover: The very same issue (`"` being typed), happens in the VS Code terminal: ![image](https://user-images.githubusercontent.com/851823/84796940-861d3500-aff9-11ea-8d0c-86e102d87aaa.png) not your turf probably but coincidence?
Author
Owner

@DHowett commented on GitHub (Jun 19, 2020):

So, this is definitely our turf (unfortunately!). We own the translation layer that VSCode is using, and it's the same one as in Windows Terminal.

Ctrl+Space gets encoded as NUL, and on the receiving end we ... translate that to Ctrl+Shif+2

Powershell treats this the same as Shift+2.

So, a little more info about terminals.

The don't really communicate in keys and modifiers and all that. They communicate in control characters or character sequences start are introduced with U+001B ESCAPE. Unfortunately, a number of different keys map to the same thing.

NUL is one of those encodings with multiple keys. Ctrl+Space and Ctrl+Shift+2 both encode to the same byte. When we try to go back from "byte" to "what keys was the user pressing at the time" we get the wrong one.

We cannot fix this in the general case. However, we recently landed #4999 which improves the fidelity of keyboard input for all consumers (opt-in!) by giving them raw access to the literal keys that were pressed.

With 4999, and with Terminal preview 1.1, Ctrl+Space comes out as Ctrl+Space and Ctrl+Shift+2 comes out as Ctrl+Shift+2.

/dup #4999

😄

@DHowett commented on GitHub (Jun 19, 2020): So, this is definitely our turf (unfortunately!). We own the translation layer that VSCode is using, and it's the same one as in Windows Terminal. <kbd>Ctrl+Space</kbd> gets encoded as `NUL`, and on the receiving end we ... translate that to <kbd>Ctrl+Shif+2</kbd> Powershell treats this the same as <kbd>Shift+2</kbd>. So, a little more info about terminals. The don't really communicate in keys and modifiers and all that. They communicate in control characters or character sequences start are introduced with `U+001B ESCAPE`. Unfortunately, a number of different keys map to the same thing. `NUL` is one of those encodings with multiple keys. <kbd>Ctrl+Space</kbd> and <kbd>Ctrl+Shift+2</kbd> both encode to the same byte. When we try to go back from "byte" to "what keys was the user pressing at the time" we get the wrong one. We **cannot fix this** in the general case. However, we recently landed #4999 which improves the fidelity of keyboard input for all consumers (opt-in!) by giving them raw access to the literal keys that were pressed. With 4999, and with Terminal preview 1.1, Ctrl+Space comes out as Ctrl+Space and Ctrl+Shift+2 comes out as Ctrl+Shift+2. /dup #4999 :smile:
Author
Owner

@ghost commented on GitHub (Jun 19, 2020):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Jun 19, 2020): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#8962