vscode icon indicating copy to clipboard operation
vscode copied to clipboard

VSCode switching input method fails

Open ExtraBits42 opened this issue 5 months ago • 6 comments
trafficstars

Type: Bug

When using vscode to edit markdown documents, you need to switch between Chinese and English input methods frequently, and the current version of vscode often appears underlined prompts after switching from English back to Chinese input methods, but there is no Chinese candidate box, and Chinese cannot be entered.

VS Code version: Code 1.101.0 (dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1, 2025-06-11T15:00:50.123Z) OS version: Windows_NT x64 10.0.26100 Modes: Remote OS version: Linux x64 5.15.0-130-generic

System Info
Item Value
CPUs AMD Ryzen 7 4700U with Radeon Graphics (8 x 1996)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.37GB (5.29GB free)
Process Argv C:\Users\seed42\Downloads\Machine Learning --crash-reporter-id d4d3fbca-b573-44fe-8976-c129e984e028
Screen Reader no
VM 0%
Item Value
Remote SSH: 114.212.82.58
OS Linux x64 5.15.0-130-generic
CPUs Intel(R) Xeon(R) Silver 4210R CPU @ 2.40GHz (20 x 1000)
Memory (System) 59.60GB (57.88GB free)
VM 100%
Extensions (39)
Extension Author (truncated) Version
vscode-django bat 1.15.0
python-environment-manager don 1.2.7
python-extension-pack don 1.7.0
gitlens eam 17.1.1
copilot Git 1.335.0
copilot-chat Git 0.28.0
mdmath goe 2.7.4
go gol 0.46.1
todo-tree Gru 0.0.226
latex-workshop Jam 10.10.0
better-cpp-syntax jef 1.27.1
vsc-python-indent Kev 1.21.0
vscode-language-pack-zh-hans MS- 1.101.2025061109
debugpy ms- 2025.8.0
isort ms- 2025.0.0
python ms- 2025.6.1
vscode-pylance ms- 2025.6.1
jupyter ms- 2025.5.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.1.0
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
remote-ssh ms- 0.120.0
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.99.0
cpptools ms- 1.25.3
remote-explorer ms- 0.5.0
autodocstring njp 0.6.1
indent-rainbow ode 8.3.1
trailing-spaces sha 0.4.1
markdowntable Tak 0.13.0
pdf tom 1.2.2
intellicode-api-usage-examples Vis 0.2.9
vscodeintellicode Vis 1.3.2
vscode-icons vsc 12.13.0
jinja who 0.0.8
markdown-pdf yza 1.5.0
markdown-all-in-one yzh 3.6.3
material-theme zhu 3.19.0
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
9064b325:31222308
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
pythonpulldiag:31325930
996jf627:31283433
pythonrdcb7:31303018
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004
pylancequickfixf:31319675
d2249276:31327029
i851h500:31328299

ExtraBits42 avatar Jun 15 '25 05:06 ExtraBits42

I'm also having the same issue, which causes vscode to be almost unusable for markdown editing work. I found that especially after entering Chinese punctuation marks, I could not use the Chinese input method to type normally.

OrangeByte42 avatar Jun 15 '25 06:06 OrangeByte42

This screen recording shows the specific problem, during the screen recording process, I have been using the Microsoft Chinese input method and did not switch, vscode appeared in the Chinese input failure, but in other software such as Typora, edge did not find this problem.

Image

OrangeByte42 avatar Jun 15 '25 07:06 OrangeByte42

I'm ExtraBits42 myself, and my system environment is the same as this issue, except that this is another GitHub account of mine.

OrangeByte42 avatar Jun 15 '25 07:06 OrangeByte42

Toggling the setting editor.experimentalEditContextEnabled might fix the issue. See https://code.visualstudio.com/updates/v1_101#_edit-context

tamuratak avatar Jun 15 '25 09:06 tamuratak

Toggling the setting editor.experimentalEditContextEnabled might fix the issue. See https://code.visualstudio.com/updates/v1_101#_edit-context

Thank you very much for your help, it has solved this issue for the time being. Hopefully, the developers will notice this bug and fix it.

OrangeByte42 avatar Jun 15 '25 13:06 OrangeByte42

cc: @aiday-mar

tamuratak avatar Jun 15 '25 20:06 tamuratak

Hi everyone really sorry for this issue. Indeed toggling the setting above mentioned by @tamuratak should fix your issue. I would like to investigate this however and would like to ask you several questions.

First of all do you see this happen also when you are using your IME on the following website? https://microsoftedge.github.io/Demos/edit-context/ . If yes it could be a bug with chromium.

I tried to reproduce your issue and I see the following. I was using the Microsoft simplified pinyin IME:

https://github.com/user-attachments/assets/b836bf69-cb7c-4d68-8ccf-c29fe0fbbde2

As I don't speak chinese, I am having a hard time reproducing. Could you point me to the exact IME you are using, and exact numbered steps for how to reproduce this issue (with the sequence of keys to press to reproduce it)? Could you also please include your settings json file so I can check if other settings are affecting the IME?

aiday-mar avatar Jun 17 '25 08:06 aiday-mar

@aiday-mar

Note that Windows 11 includes two different versions of the Microsoft Simplified Chinese IME for compatibility, which can cause differences in behavior. It seems you're using the newer version, while the OP is using the older one.

  • https://support.microsoft.com/en-us/windows/microsoft-simplified-chinese-ime-9b962a3b-2fa4-4f37-811c-b1886320dd72#ID0EDBBBDBH

The same applies to the Japanese IME.

  • https://support.microsoft.com/en-us/windows/microsoft-japanese-ime-da40471d-6b91-4042-ae8b-713a96476916

tamuratak avatar Jun 17 '25 09:06 tamuratak

Hi everyone really sorry for this issue. Indeed toggling the setting above mentioned by @tamuratak should fix your issue. I would like to investigate this however and would like to ask you several questions.

First of all do you see this happen also when you are using your IME on the following website? https://microsoftedge.github.io/Demos/edit-context/ . If yes it could be a bug with chromium.

I tried to reproduce your issue and I see the following. I was using the Microsoft simplified pinyin IME:

Screen.Recording.2025-06-17.at.10.05.05.mov As I don't speak chinese, I am having a hard time reproducing. Could you point me to the exact IME you are using, and exact numbered steps for how to reproduce this issue (with the sequence of keys to press to reproduce it)? Could you also please include your settings json file so I can check if other settings are affecting the IME?

Thank you for your interest.

  1. I tried to reproduce the bug in the website you provided:https://microsoftedge.github.io/Demos/edit-context/, but everything is fine;
  2. The input method I use is the windows11 built-in input method (Chinese Simplified Chinese-Pinyin);
  3. My settings json content is: https://paste.ubuntu.com/p/WRC3kP4w7R/
  4. The specific reproduction method of this bug is as demonstrated in your video: on the one hand, when using the Chinese input method to input multiple times in a row, there will be no candidate prompt box; On the other hand, when switching between Chinese and English, sometimes after switching back to Chinese input method from the English input method, there is no candidate prompt box, but the English letters of the input pinyin are underlined;

OrangeByte42 avatar Jun 17 '25 12:06 OrangeByte42

Hi everyone really sorry for this issue. Indeed toggling the setting above mentioned by @tamuratak should fix your issue. I would like to investigate this however and would like to ask you several questions. First of all do you see this happen also when you are using your IME on the following website? https://microsoftedge.github.io/Demos/edit-context/ . If yes it could be a bug with chromium. I tried to reproduce your issue and I see the following. I was using the Microsoft simplified pinyin IME: Screen.Recording.2025-06-17.at.10.05.05.mov As I don't speak chinese, I am having a hard time reproducing. Could you point me to the exact IME you are using, and exact numbered steps for how to reproduce this issue (with the sequence of keys to press to reproduce it)? Could you also please include your settings json file so I can check if other settings are affecting the IME?

Thank you for your interest.

  1. I tried to reproduce the bug in the website you provided:https://microsoftedge.github.io/Demos/edit-context/, but everything is fine;
  2. The input method I use is the windows11 built-in input method (Chinese Simplified Chinese-Pinyin);
  3. My settings json content is: https://paste.ubuntu.com/p/WRC3kP4w7R/
  4. The specific reproduction method of this bug is as demonstrated in your video: on the one hand, when using the Chinese input method to input multiple times in a row, there will be no candidate prompt box; On the other hand, when switching between Chinese and English, sometimes after switching back to Chinese input method from the English input method, there is no candidate prompt box, but the English letters of the input pinyin are underlined;

It seems you're using the old version of Simplified Chinese - Pinyin. Would you like to try the new version? You can enable it by disabling compatibility mode for Simplified Chinese - Pinyin in your settings.

llleixx avatar Jun 17 '25 15:06 llleixx

Hi everyone, thanks for the comments. I was actually on the latest Chinese input IME and downgraded. I see the following when I type nihao. Am I correct in understanding that there should be an IME box that should appear when typing nihao in the case below?

https://github.com/user-attachments/assets/9ed0f6f4-6912-465d-89d4-c32c0495c0b4

I am wondering if this is a chromium bug that has since been fixed in chromium but for which we do not have the fix yet (since our Electron version is behind a bit). Can you therefore please tell me if you see this happening with the same settings you have AND the edit context enabled on the website https://insiders.vscode.dev/ on your up to date chrome navigator if you have one?

aiday-mar avatar Jun 17 '25 18:06 aiday-mar

Hi everyone, thanks for the comments. I was actually on the latest Chinese input IME and downgraded. I see the following when I type nihao. Am I correct in understanding that there should be an IME box that should appear when typing nihao in the case below?

Screen.Recording.2025-06-17.at.20.15.05.mov I am wondering if this is a chromium bug that has since been fixed in chromium but for which we do not have the fix yet (since our Electron version is behind a bit). Can you therefore please tell me if you see this happening with the same settings you have AND the edit context enabled on the website https://insiders.vscode.dev/ on your up to date chrome navigator if you have one?

Yes, your understanding is correct, I also tried to input on the website you provided, reproducing the problem originally raised by the Issue, not only directly entering nihao will have problems, in the case of large paragraphs of Chinese and English staggered input, sometimes the Chinese input method will fail and the same problem occurs.

OrangeByte42 avatar Jun 18 '25 08:06 OrangeByte42

Hi everyone really sorry for this issue. Indeed toggling the setting above mentioned by @tamuratak should fix your issue. I would like to investigate this however and would like to ask you several questions. First of all do you see this happen also when you are using your IME on the following website? https://microsoftedge.github.io/Demos/edit-context/ . If yes it could be a bug with chromium. I tried to reproduce your issue and I see the following. I was using the Microsoft simplified pinyin IME: Screen.Recording.2025-06-17.at.10.05.05.mov As I don't speak chinese, I am having a hard time reproducing. Could you point me to the exact IME you are using, and exact numbered steps for how to reproduce this issue (with the sequence of keys to press to reproduce it)? Could you also please include your settings json file so I can check if other settings are affecting the IME?

Thank you for your interest.

  1. I tried to reproduce the bug in the website you provided:https://microsoftedge.github.io/Demos/edit-context/, but everything is fine;
  2. The input method I use is the windows11 built-in input method (Chinese Simplified Chinese-Pinyin);
  3. My settings json content is: https://paste.ubuntu.com/p/WRC3kP4w7R/
  4. The specific reproduction method of this bug is as demonstrated in your video: on the one hand, when using the Chinese input method to input multiple times in a row, there will be no candidate prompt box; On the other hand, when switching between Chinese and English, sometimes after switching back to Chinese input method from the English input method, there is no candidate prompt box, but the English letters of the input pinyin are underlined;

It seems you're using the old version of Simplified Chinese - Pinyin. Would you like to try the new version? You can enable it by disabling compatibility mode for Simplified Chinese - Pinyin in your settings.

Thank you very much,I did turn on the input method compatibility switch,When the compatibility is turned off,The problem on https://insiders.vscode.dev/ seems to be gone

OrangeByte42 avatar Jun 18 '25 08:06 OrangeByte42

I see thanks. So you are saying that this issue happens also on the insiders.vscode.dev website on your up-to-date chrome browser? Can you please send me a screen recording? I would like to see and further investigate the issue.

aiday-mar avatar Jun 18 '25 08:06 aiday-mar

Can you please let me know if you see this happen only on the old version of the Microsoft Pinyin IME? If you use the newer version of the Microsoft Pinyin IME and you use the EditContext, then you no longer see this issue?

aiday-mar avatar Jun 18 '25 08:06 aiday-mar

I see thanks. So you are saying that this issue happens also on the insiders.vscode.dev website on your up-to-date chrome browser? Can you please send me a screen recording? I would like to see and further investigate the issue.

Yes, everything is fine when the compatibility switch of Microsoft Pinyin input method is turned off, and once turned on will cause the problem of this issue. This method works on my machine. I'm using the latest Edge browser (which is based on the Chromium kernel, of course).

https://github.com/user-attachments/assets/f8657f27-27bd-4c22-a2e5-9ffe478921d0

OrangeByte42 avatar Jun 18 '25 10:06 OrangeByte42

Hi everyone. It would seem this issue happens with the old version of the Microsoft Chinese Pinyin IME. To fix this issue please consider doing one of the following:

  • Upgrade to the newer version of the Microsoft Chinese Pinyin IME
  • Turn off the setting editor.experimentalEditContextEnabled, soon to be called editor.editContext

The first solution is preferred because the EditContext API solves other bugs related to the IME (such as the incorrect rendering of the IME input). This issue will be closed.

aiday-mar avatar Jun 18 '25 13:06 aiday-mar

For those who had the previous IME version enabled, can I ask you whether you explicitly downgraded or is this the default value you had? If you downgraded, why did you do it?

aiday-mar avatar Jun 18 '25 14:06 aiday-mar

old: Image new: Image

First, the comparison between the old and new versions is shown in the image above.

I deliberately use the old version because the new version wastes more space with useless buttons, including page-turning tabs and AI suggestions, and these buttons cannot be turned off.

Meanwhile, since I have a need for gaming, I added an English keyboard layout. When switching keyboards using Win+Space, the old IME can be used immediately. The new IME, however, suffers from a delayed response of several seconds before it starts working. Task Manager shows ctfmon consuming about 20% CPU during this time.

Given these two reasons, it's almost impossible for me to switch to the new version. The two solutions you provided do not resolve the issues. I believe editcontext should be adapted to support the old version, rather than having us abandon the old version.

lycc193 avatar Jun 19 '25 18:06 lycc193

I see thanks. So you are saying that this issue happens also on the insiders.vscode.dev website on your up-to-date chrome browser? Can you please send me a screen recording? I would like to see and further investigate the issue.

Yes, everything is fine when the compatibility switch of Microsoft Pinyin input method is turned off, and once turned on will cause the problem of this issue. This method works on my machine. I'm using the latest Edge browser (which is based on the Chromium kernel, of course).

2025-06-18-18-37-21.mp4

I try it but still have problem.

When I turn off editor.experimentalEditContextEnabled setting, the behavior is normal.

li1234yun avatar Jun 20 '25 01:06 li1234yun

Hi @lycc193 thank you for the comment. I will keep that in mind.

Hi @li1234yun can you please include a screen recording where you see this happen with the new IME as well as your settings?

aiday-mar avatar Jun 20 '25 07:06 aiday-mar

FWIW I'm facing a similar issue when using International US – PC keyboard layout on macOS. A particularity of this keyboard is that e.g. the ' key is a "dead key", meaning pressing it produces nothing, but it affects the next key I press (e.g. '+e produces é, '+<space> produces '). Anytime I use a "dead key", e.g. if I want to delete inside of a string (d+i+'+), it glitches and adds a 'char at the position of the cursor. Turning offexperimentalEditContextEnabled` does fix the behavior, the IME suggestion does not apply to me (AFAICT).

aduh95 avatar Jun 21 '25 12:06 aduh95

Hi @aduh95 thanks for commenting. I will create a separate issue out of this and investigate this more at a later date.

aiday-mar avatar Jun 23 '25 07:06 aiday-mar

For those who had the previous IME version enabled, can I ask you whether you explicitly downgraded or is this the default value you had? If you downgraded, why did you do it?

When using certain software, I have to enable 'Use previous version of Microsoft Pinyin Input Method'. One example is 3ds Max - if I don't enable this setting, pressing Alt+Right Click to bring up the animation menu will cause the entire 3ds Max interface to freeze. This can be reliably reproduced in 3ds Max 2014-2024. In lower versions, I can exit the frozen state by switching windows, but in higher versions, there's no way to exit the frozen state at all. I think users of certain other software might have the same issue, but these users probably rarely use VSCode.

a690089735 avatar Jun 24 '25 10:06 a690089735

"editor.experimentalEditContextEnabled": false also fixes a bug on french azerty keyboard with vscode-vim when using ^^ The bug is that the caret character ^ replaces the current character when typing ^^ to go to the beginning of the line.

piec avatar Jul 10 '25 13:07 piec

Hi everyone I recently changed the logic of how we handle input in VS Code when the EditContext API is enabled. I should think the issues should be resolved on Insiders and soon on the next stable release. Let me know if this is not the case.

aiday-mar avatar Jul 10 '25 13:07 aiday-mar