You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open powershell 7.1.4 in windows terminal.
In cyrillic keymap press CTRL+С (C cyrillic)
CTRL not working and terminal show C
CTRL+A and CTRL+C not working after it in both keymaps
There is also another cases but it hard to reproduce.
Expected behavior
Actual behavior
CTRL+C working correctly
Reacted by SeryiBaran, blackrek, Xotchkass, Andry, bar4488, Vladislav Dzhidzhoev, Ilia Burakov and Pasha Suprunchuk
I come back with mysterious addition.
When open PS and CTRL+C(Cyrillic), PS react like Cyrillic C entered. And when do CTRL+C just add c, and CTRL+Ф add 'ф', but if i switch layout to ENG, and input a then a will be added, but when i press CTRL+A then PS treat A as russian ф
243083df Given that Ilya (@iSazonov) couldn't reproduce the issue using Russian Keyboard, we need more information on the repro steps. Can you be more specific on what keyboard you are using, what display language and default language, as well as what additional software you installed that you think may affect the language input on your machine?
I debugged this problem and found what user32.dll works only with one locale with that it started. https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Keys.cs#L150
Since if you start PSReadline and press english CTRL+any then ToUnicode always return english chars in chars.
And if you (re)start PSReadline and press cyrillic CTRL+any, ToUnicode always return cyrillic chars in chars.
This is a duplicate of #1393. You may also take a look at my previous attempt at fixing this, PR #1848.
For the record, this still 100% reproduces for me using PowerShell 7.2 and any Windows Terminal (or conhost for that matter), on all of my Windows 10 and Windows 11 computers.
Reacted by SeryiBaran, Vladislav Dzhidzhoev and Ilia Burakov
Activity
243083df commentedon Sep 17, 2021
microsoft/terminal#11232
daxian-dbw commentedon Sep 17, 2021
What keyboard layout are you using?
243083df commentedon Sep 19, 2021
Russian (Russia)
https://docs.microsoft.com/en-us/globalization/keyboards/kbdru
daxian-dbw commentedon Sep 21, 2021
Ilya (@iSazonov) Are you able to reproduce this issue?
iSazonov commentedon Sep 21, 2021
No. The same PSRL 2.1.0 but PS 7.2:

daxian-dbw commentedon Sep 21, 2021
Thank you Ilya (@iSazonov)! You were using the Russian Keyboard, right?
243083df commentedon Sep 21, 2021
I come back with mysterious addition.
When open PS and
CTRL+C(Cyrillic), PS react like CyrillicCentered. And when doCTRL+Cjust addc, andCTRL+Фadd 'ф', but if i switch layout to ENG, and inputathenawill be added, but when i pressCTRL+Athen PS treatAas russianфiSazonov commentedon Sep 22, 2021
Yes, and I switched to Russian layout.
iSazonov commentedon Sep 22, 2021
Windows Terminal versionI I tested with is latest Preview 1.11.2421.
daxian-dbw commentedon Sep 23, 2021
243083df Given that Ilya (@iSazonov) couldn't reproduce the issue using Russian Keyboard, we need more information on the repro steps. Can you be more specific on what keyboard you are using, what display language and default language, as well as what additional software you installed that you think may affect the language input on your machine?
243083df commentedon Sep 28, 2021
I debugged this problem and found what user32.dll works only with one locale with that it started.
https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Keys.cs#L150
Since if you start PSReadline and press english CTRL+
anythen ToUnicode always return english chars inchars.And if you (re)start PSReadline and press cyrillic CTRL+
any, ToUnicode always return cyrillic chars inchars.user32.dll has version 10.0.19041.1202
243083df commentedon Sep 28, 2021
Have this language settings
This for english
This for russian
243083df commentedon Oct 11, 2021
Bug wont reproduce on ubuntu 20.04 LTS under WSL2. Same PC.
243083df commentedon Oct 11, 2021
I am debug further and find out that
https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/ReadLine.cs#L103
With ctrl return in
KeyCharnot ascii code, but alphabelic so CTRL+C become3 '\u0003'andchar.IsControlat https://github.com/PowerShell/PSReadLine/blob/master/PSReadLine/Keys.cs#L231return
trueConsole.ReadKey();return same result so seems thats it used to readkeysForNeVeR commentedon Nov 20, 2021
This is a duplicate of #1393. You may also take a look at my previous attempt at fixing this, PR #1848.
For the record, this still 100% reproduces for me using PowerShell 7.2 and any Windows Terminal (or conhost for that matter), on all of my Windows 10 and Windows 11 computers.
o-sdn-o commentedon Nov 15, 2024
Stable repro (PSReadLine 2.4.0-beta0): microsoft/terminal#17197 (comment)