Skip to content

When typing CJK characters quickly, character input intermittently becomes abnormal. #9864

@iblea

Description

@iblea

Describe the bug

When typing CJK characters quickly, character input intermittently becomes abnormal.

(Limited to typing quickly) When the Vim extension is disabled, typing works without any issues.
However, when the Vim extension is enabled and typing, problems occur such as CJK characters not composing properly, characters being output twice, or not being output at all.

  • (gksrmf whgkqdl) (ㅎ,ㅏ,ㄴ,ㄱ,ㅡ,ㄹ, ,ㅈ,ㅗ,ㅎ,ㅏ,ㅂ,ㅇ,ㅣ)
  • This string causes a bug when entered with the Korean input method selected. (Korean is not output identically to the keys that were pressed.)
  • expected: "한글 조합이"
  • current: "한글 조합합이" or Differs from expected state.
  • Note: The script works correctly when the extension is disabled.

I've written an osascript that reproduces the bug. Please refer to it. (korean_bug.osascript)

-- Settings
set initialDelay to 2 -- Initial delay before starting
set keyDelay to 0.015 -- Delay between key inputs

tell application "System Events"
    -- Initial delay
    delay initialDelay

    -- 한 (ㅎ + ㅏ + ㄴ)
    key code 5 -- ㅎ (g)
    delay keyDelay
    key code 40 -- ㅏ (k)
    delay keyDelay
    key code 1 -- ㄴ (s)
    delay keyDelay

    -- 글 (ㄱ + ㅡ + ㄹ)
    key code 15 -- ㄱ (r)
    delay keyDelay
    key code 46 -- ㅡ (m)
    delay keyDelay
    key code 3 -- ㄹ (f)
    delay keyDelay

    -- space
    key code 49 -- space
    delay keyDelay

    -- 조 (ㅈ + ㅗ)
    key code 13 -- ㅈ (w)
    delay keyDelay
    key code 4 -- ㅗ (h)
    delay keyDelay

    -- 합 (ㅎ + ㅏ + ㅂ)
    key code 5 -- ㅎ (g)
    delay keyDelay
    key code 40 -- ㅏ (k)
    delay keyDelay
    key code 12 -- ㅂ (q)
    delay keyDelay

    -- 이 (ㅇ + ㅣ)
    key code 2 -- ㅇ (d)
    delay keyDelay
    key code 37 -- ㅣ (l)
end tell

To Reproduce

  1. Install Korean IME. (Korean Dubeolsik (two-set) Keyboard Layout)
  • (On MacOS, use Keyboard Shortcuts > Input Sources shortcut.)
  1. osascript ~/korean_bug.osascript command execute.
  2. The wait time for key input in osascript is 2 seconds.
    Within 2 seconds, quickly switch to input mode in VSCode Vim and change to Korean input method.
  3. Watch the string being entered.

Screenshots / Video

vscodevim_bug2.mp4

Environment (please complete the following information)

  • Extension (VsCodeVim) version: (1.32.2) last version, (The issue is also occurring in the previous version.)
  • VSCode version: (1.107.0) last version, (The issue is also occurring in the previous version.)
  • OS: MacOS 15.6.1

The issue has been continuously occurring since upgrading VSCode to a certain version or above.

Additional context

Recently, too many CJK-related bugs have been occurring in vscodevim.
Previously, it was at a level where the extension could be used while tolerating some inconvenience, but now it has reached a level of inconvenience where CJK typing is impossible while using the Vim extension.
VSCode is a Global Platform. I request that you develop it while considering use-case scenarios for various characters as well.
Thank you for your hard work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions