Skip to content

Windows: KeyboardInput events are still emitted while IME is allowed #4508

@umajho

Description

@umajho

Description

The document of set_ime_allowed states:

When IME is allowed, the window will receive Ime events, and during the preedit phase the window will NOT get KeyboardInput events. The window should allow IME while it is expecting text input.

on Wayland + IBus, it works as intended

Image
(This was inside a VM. I typed ceui in QWERTY, but the host OS was set to a keyboard layout with Colemak. As a result, the GIF recorder interpreted the input as Colemak keystrokes and captured it as cflu.)

on macOS (15.7.3), it works mostly as intended

Image

(Though, on macOS, the releasing of the last Backspace is leaked. (See #4526))

on Windows, KeyboardInput events are still emitted

(Windows 11 25H2, Virtual Machine in Parallels 26.2.2)

Image
(This was inside a VM. I typed ceui in QWERTY, but the host OS was set to a keyboard layout with Colemak. As a result, the GIF recorder interpreted the input as Colemak keystrokes and captured it as cflu.)

Reproduction

https://gist.github.com/umajho/5f42a9cfe49ecfe61d4a9753796d00f2

Windows version

Microsoft Windows [Version 10.0.26200.7840]

Winit version

0.30.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    B - bugDang, that shouldn't have happenedDS - win32Affects the Win32/Windows backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions