microsoft / microsoft/terminal

Regression: Switching keyboard layouts results in corrupted keyboard output

Open
#17,187 13 comments 0 reactions 0 assignees View on GitHub
Issue-Bug Needs-Attention Needs-Triage
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

### 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.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with Command Prompt: switch from English to Finnish while the prompt is open, then compare its keyboard-layout state and typed characters with a newly opened prompt. Trace the keyboard-layout handling for an already-running command prompt; done means switching layouts updates the UI state and produces the correct Finnish key mapping without reopening the window.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.