Regression: Switching keyboard layouts results in corrupted keyboard output #21630

Open
opened 2026-01-31 07:50:16 +00:00 by claunia · 13 comments
Owner

Originally created by @juj on GitHub (May 3, 2024).

Windows Terminal version

1.19.10821.0

Windows build number

10.0.22631.3447

Other Software

N/A

Steps to reproduce

  1. Open command prompt
  2. Change to another keyboard layout in taskbar (e.g. from English to Finnish)
  3. Bug 1: open the keyboard layout UI in task bar, and observe that the keyboard layout is showing conflicting state
  4. Type in chars to the command prompt window
  5. Bug 2: observe that typed keys are incorrect (they do not follow the Finnish keymap)
  6. Close the command prompt window
  7. Change the keyboard layout to Finnish
  8. Open a new command prompt, so that this prompt starts up immediately in the Finnish keyboard layout
  9. Type in chars to the command prompt window
  10. Observe that this time they keys are indeed correct for Finnish keyboard layout, unlike in step 4.

So it looks like starting up command prompt in the desired keyboard layout produces correct keys to that layout, but starting prompt in another layout and then attempting to change the layout while command prompt is running, results in corrupted layout.

Showcase video of the bug in action: https://youtu.be/LDEJsrhHgRo

Expected Behavior

No response

Actual Behavior

Incorrect keys are output.

Originally created by @juj on GitHub (May 3, 2024). ### Windows Terminal version 1.19.10821.0 ### Windows build number 10.0.22631.3447 ### Other Software N/A ### Steps to reproduce 1. Open command prompt 2. Change to another keyboard layout in taskbar (e.g. from English to Finnish) 3. Bug 1: open the keyboard layout UI in task bar, and observe that the keyboard layout is showing conflicting state 4. Type in chars to the command prompt window 5. Bug 2: observe that typed keys are incorrect (they do not follow the Finnish keymap) 6. Close the command prompt window 7. Change the keyboard layout to Finnish 8. Open a new command prompt, so that this prompt starts up immediately in the Finnish keyboard layout 9. Type in chars to the command prompt window 10. Observe that this time they keys are indeed correct for Finnish keyboard layout, unlike in step 4. So it looks like starting up command prompt in the desired keyboard layout produces correct keys to that layout, but starting prompt in another layout and then attempting to change the layout while command prompt is running, results in corrupted layout. Showcase video of the bug in action: https://youtu.be/LDEJsrhHgRo ### Expected Behavior _No response_ ### Actual Behavior Incorrect keys are output.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 07:50:17 +00:00
Author
Owner

@zadjii-msft commented on GitHub (May 3, 2024):

You know what, we just published a major update to our IME implementation in the nightly Canary branch. It was rewritten from the ground up. Can you try that out, and see if that repros this behavior/? You can get it from: https://aka.ms/terminal-canary-installer
If you already have the Canary build installed, you can use this link to force an update.

@zadjii-msft commented on GitHub (May 3, 2024): You know what, we just published a major update to our IME implementation in the nightly Canary branch. It was rewritten from the ground up. Can you try that out, and see if that repros this behavior/? You can get it from: https://aka.ms/terminal-canary-installer If you already have the Canary build installed, you can use this link to force an update.
Author
Owner

@juj commented on GitHub (May 3, 2024):

Thanks for the quick reply. Before I try it out, is the canary installation somehow separate (and uninstallable?) so that it won't overwrite my regular command prompt? Or is there a way to roll back to the previous command prompt from the canary one?

@juj commented on GitHub (May 3, 2024): Thanks for the quick reply. Before I try it out, is the canary installation somehow separate (and uninstallable?) so that it won't overwrite my regular command prompt? Or is there a way to roll back to the previous command prompt from the canary one?
Author
Owner

@lhecker commented on GitHub (May 3, 2024):

Yes it's a completely separate, packaged application. It'll not conflict with your other Windows Terminal installations. And if you uninstall it, it'll be gone as if it was never installed. :)

I don't think Finnish relies on IME/TSF, but I think it's worth a try regardless, since there's a number of other input related changes in there.

Edit: I tested the same Windows Terminal version, on (almost) the same Windows version, with the steps in the YouTube video and I couldn't reproduce the issue. Something fishy is going on. 🤔
It may be worth trying to uninstall the Finnish layout, reboot, and reinstall it. Or maybe some similar combination? I wonder if something about msctf (the text input service) is broken.

@lhecker commented on GitHub (May 3, 2024): Yes it's a completely separate, packaged application. It'll not conflict with your other Windows Terminal installations. And if you uninstall it, it'll be gone as if it was never installed. :) I don't think Finnish relies on IME/TSF, but I think it's worth a try regardless, since there's a number of other input related changes in there. Edit: I tested the same Windows Terminal version, on (almost) the same Windows version, with the steps in the YouTube video and I couldn't reproduce the issue. Something fishy is going on. 🤔 It may be worth trying to uninstall the Finnish layout, reboot, and reinstall it. Or maybe some similar combination? I wonder if something about msctf (the text input service) is broken.
Author
Owner

@juj commented on GitHub (May 3, 2024):

Ok, trying out the Canary version, the layout issue does not reproduce there.

I've also tried a couple of other applications, and the layout issue does not occur in any of those either: Notepad, Sublime Text, Firefox and Chrome web browser, Paint.NET, they are all good. Only cmd.exe is giving this keyboard layout issue.

image

image

@juj commented on GitHub (May 3, 2024): Ok, trying out the Canary version, the layout issue does not reproduce there. I've also tried a couple of other applications, and the layout issue does not occur in any of those either: Notepad, Sublime Text, Firefox and Chrome web browser, Paint.NET, they are all good. Only cmd.exe is giving this keyboard layout issue. ![image](https://github.com/microsoft/terminal/assets/225351/6b7cd760-39ad-4180-bcf6-eda57cb6b12a) ![image](https://github.com/microsoft/terminal/assets/225351/9b608b82-235c-498e-8fda-82eb0d4095b4)
Author
Owner

@juj commented on GitHub (May 3, 2024):

Not much info to glean about the Text Input Management Service...

image

@juj commented on GitHub (May 3, 2024): Not much info to glean about the Text Input Management Service... ![image](https://github.com/microsoft/terminal/assets/225351/ad70b2a9-28d8-4951-848f-dd29b525f156)
Author
Owner

@carlos-zamora commented on GitHub (May 8, 2024):

Thanks for confirming that it doesn't repro on Canary. This should be available now in WT Preview v1.21. Closing as fixed.

@carlos-zamora commented on GitHub (May 8, 2024): Thanks for confirming that it doesn't repro on Canary. This should be available now in WT Preview v1.21. Closing as fixed.
Author
Owner

@juj commented on GitHub (Sep 18, 2024):

Hey, any idea when this fixed 1.21 version might land to end users? I am still regularly hitting this bug on multiple Windows 11 PCs that have dual English + Finnish keyboard layouts set up, most recently today on an up-to-date Windows 11 PC with Windows Terminal 1.20.11781.0.

@juj commented on GitHub (Sep 18, 2024): Hey, any idea when this fixed 1.21 version might land to end users? I am still regularly hitting this bug on multiple Windows 11 PCs that have dual English + Finnish keyboard layouts set up, most recently today on an up-to-date Windows 11 PC with Windows Terminal 1.20.11781.0.
Author
Owner

@DHowett commented on GitHub (Sep 18, 2024):

You should be able to install Terminal 1.21 via winget or the Releases page in this repository. We are rolling it out slowly on account of a platform issue in Windows 11 23H2 (10.0.226xx.0), as we've measured an increase in hanging sessions.

@DHowett commented on GitHub (Sep 18, 2024): You should be able to install Terminal 1.21 via winget or the Releases page in this repository. We are rolling it out slowly on account of a platform issue in Windows 11 23H2 (10.0.226xx.0), as we've measured an increase in hanging sessions.
Author
Owner

@juj commented on GitHub (Feb 25, 2025):

It turns out this issue is still happening, but the characters that are getting printed have changed. I think this bug should be reopened.

Microsoft Windows [Version 10.0.26100.2605]

Windows Terminal
Version: 1.21.10351.0

Or should I open a new issue?

@juj commented on GitHub (Feb 25, 2025): It turns out this issue is still happening, but the characters that are getting printed have changed. I think this bug should be reopened. Microsoft Windows [Version 10.0.26100.2605] Windows Terminal Version: 1.21.10351.0 Or should I open a new issue?
Author
Owner

@lhecker commented on GitHub (Feb 25, 2025):

I think since it's just us here, we can just reopen this issue. This lets us keep its entire history. In what way does it behave now?

@lhecker commented on GitHub (Feb 25, 2025): I think since it's just us here, we can just reopen this issue. This lets us keep its entire history. In what way does it behave now?
Author
Owner

@juj commented on GitHub (Feb 26, 2025):

Here is a video: https://youtu.be/BFI-9UfRjNk

The behavior is quit the same as before. The only difference I notice is that the incorrect characters that are displayed are different than in the first video.

@juj commented on GitHub (Feb 26, 2025): Here is a video: https://youtu.be/BFI-9UfRjNk The behavior is quit the same as before. The only difference I notice is that the incorrect characters that are displayed are different than in the first video.
Author
Owner

@juj commented on GitHub (May 22, 2025):

Friendly ping: I wonder if this issue could be looked at?

I got a new PC, so this issue is reproducing on two different Windows 11 systems I have now. It is causing a lot of annoyance, and a major regression from Windows 10.

Setup is a rather simple dual keyboard layout that I've used as long as I remember, since Windows NT days or similar.

Image

Windows 11 Pro 23H2
Microsoft Windows [Version 10.0.22631.5335]
Windows Terminal
Version: 1.22.11141.0

@juj commented on GitHub (May 22, 2025): Friendly ping: I wonder if this issue could be looked at? I got a new PC, so this issue is reproducing on two different Windows 11 systems I have now. It is causing a lot of annoyance, and a major regression from Windows 10. Setup is a rather simple dual keyboard layout that I've used as long as I remember, since Windows NT days or similar. ![Image](https://github.com/user-attachments/assets/bee674ef-eca5-4b8a-ab78-07c8ab5b6b04) Windows 11 Pro 23H2 Microsoft Windows [Version 10.0.22631.5335] Windows Terminal Version: 1.22.11141.0
Author
Owner

@juj commented on GitHub (Oct 9, 2025):

Ping, any updates here? This issue is still happening.

Microsoft Windows [Version 10.0.26100.4351]
Windows Terminal Version: 1.22.12111.0

@juj commented on GitHub (Oct 9, 2025): Ping, any updates here? This issue is still happening. Microsoft Windows [Version 10.0.26100.4351] Windows Terminal Version: 1.22.12111.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#21630