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

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

Closed
juj opened this issue May 3, 2024 · 8 comments
Closed
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@juj
Copy link

juj commented 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.

@juj juj added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels May 3, 2024
@zadjii-msft
Copy link
Member

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.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label May 3, 2024
@juj
Copy link
Author

juj commented 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?

@microsoft-github-policy-service microsoft-github-policy-service bot added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels May 3, 2024
@lhecker
Copy link
Member

lhecker commented 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.

@juj
Copy link
Author

juj commented 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
Copy link
Author

juj commented May 3, 2024

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

image

@carlos-zamora
Copy link
Member

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

@juj
Copy link
Author

juj commented 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.

@DHowett
Copy link
Member

DHowett commented 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests

5 participants