Skip to content

Clarification about whether requirement to send key events during composition extends to platforms #395

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ogarai opened this issue Apr 10, 2025 · 1 comment

Comments

@ogarai
Copy link

ogarai commented Apr 10, 2025

The section Key Events During Composition mentions key events along with isComposing attribute MUST be sent even during composition.

During the composition session, keydown and keyup events MUST still be sent, and these events MUST have the isComposing attribute set to true.

The following exceptions to this rule seem to somewhat relax the requirement above:

  • Section "Input Method Editors" has the following note:

    In some implementations or system configurations, some key events, or their values, might be suppressed by the IME in use.

  • In compositionstart:

    When a keyboard is used to feed an input method editor, this event type is generated after a keydown event, but speech or handwriting recognition systems MAY send this event type without keyboard events.

In some platforms like Linux Wayland, processing key events for composition might be done in the platform in such a way that all key events may not be received by the browsers from the platform, receiving only the processed composition events.

In this case, what is the exact expectation? Does this spec extend to the platforms to be forced to send all key events to browsers or is there some flexibility here, in which case the platform may chose not to send them, even for text that is composed using keyboards and not other means like speech or handwriting, and browsers can only send key events "if" they are notified about them from the platform?

cc: @garnacho, @fangzhoug, @nickdiego, @wengxt

@ogarai
Copy link
Author

ogarai commented Apr 15, 2025

cc: @garykac @travisleithead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant