Skip to content

macOS: key-release events are leaked for keys processed by IME but released after the composition has been finished #4526

@umajho

Description

@umajho

Description

“key-release events” = KeyboardInput events with ElementState::Released.

Example 1: If I pressed Space before releasing A with the builtin Chinese IME, the key-release events for both Space and A are leaked.
Image

Example 2: If I pressed Enter to commit with the builtin Japanese IME, the key-release event for Enter is leaked:
Image

Example 3: If I typed something with the builtin Chinese IME, and used Backspace to remove everything I typed, the key-release event of the last Backspace is leaked:
Image

The ideal behavior should look like the Wayland + IBus one demonstrated in #4508.

Reproduction

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

macOS version

ProductName:		macOS
ProductVersion:		15.7.3
BuildVersion:		24G419

Winit version

0.30.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    B - bugDang, that shouldn't have happenedDS - appkitAffects the AppKit/macOS backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions