microsoft / microsoft/vscode

Integrated terminal inserts IME-committed text twice (WeChat IME voice input, Windows)

Open
#335,425 1 comment 0 reactions 1 assignee Claimed by @kycutler View on GitHub
triage-needed
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

---

Does this issue occur when all extensions are disabled?: Yes

- VS Code Version: 1.137.0 (also reproduced on 1.127.0 before updating)
- OS Version: Windows 11 Pro for Workstations (10.0.26200)
- IME: WeChat Input Method (微信输入法), voice input feature
- Shells tested: PowerShell 7.5.3 and cmd.exe (both affected)

Steps to Reproduce:

1. Install **WeChat Input Method** (微信输入法, a popular third-party Chinese IME on Windows) and enable its voice input feature.
2. Open the VS Code integrated terminal (reproduces with both pwsh and cmd).
3. Use the IME's voice input to dictate a sentence into the terminal.
4. The recognized text is inserted **twice** — e.g. dictating `hello world` produces `hello worldhello world` (same for Chinese sentences).

**Expected:** the committed text is inserted once.

**Isolation tests performed** — duplication happens *only* in the integrated terminal panel:

| Target | Result |
| --- | --- |
| VS Code integrated terminal (pwsh / cmd) | ❌ duplicated |
| VS Code **editor area** (same window) | ✅ normal |
| Standalone PowerShell window (conhost) | ✅ normal |
| Notepad / browser text boxes | ✅ normal |
| Integrated terminal + `Win+H` (Windows built-in voice typing) | ✅ normal |

Since the editor area of the same Electron window is unaffected and both shells are affected, this points to the terminal frontend (xterm.js) rather than Chromium's IME handling or the shell/ConPTY layer.

Also verified it is **not** a console codepage issue: setting `[Console]::InputEncoding`/`OutputEncoding` to UTF-8 (65001) in the PowerShell profile does not change the behavior. PSReadLine 2.3.6 is installed; the issue also reproduces in cmd, so PSReadLine is not involved.

Additional context:

- WeChat IME's voice input commits the whole recognized sentence at once through the IME/TSF commit channel (not as individual keystrokes), which seems to be what triggers the double insertion.
- Related prior reports: #235138, #135940, #141578, upstream xtermjs/xterm.js#3533 — possibly the same terminal-input/IME issue family, still present in 1.137.0 on Windows with a TSF-injecting IME.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.