Skip to content

Improve IME event handling #1293

Closed

Description

@garasubo

Reference: servo/servo#24724

When I tried to implement compositions event handling for the browser engine, I realized that current event interface doesn't have enough information about IME events.
To implement this, we need to know what is the current content in IME when the user edit something in IME. But seems glutin::WindowEvent::KeyboardInput doesn't have interface to get that information. It would be nice to send more information when IME status was updated.

Currently, winit submits character information when IME edit completes. But to implement compositions event handling, those information should be available when updating the status as well. In addition, winit sends charcter information for each characters (e.g. if the content in IME was "あああ", it sends 3 ReceiveCharacter('あ') event) . It would be nice to have send this information as a string.

I tested this on my Linux with X11, but all other platforms might have the same issues.

Activity

  1. added
    DS - x11
    C - needs discussion
    S - api
    S - enhancement
    on Nov 29, 2019
  2. goddessfreya commented on Nov 29, 2019

    @goddessfreya
    Contributor

    cc @murarth, I'm not familiar with how IME works, are you?

  3. murarth commented on Nov 29, 2019

    @murarth
    Contributor

    I'm not at all familiar with IME, but I'll read some docs and see what I can do for this issue.

  4. garasubo commented on Dec 2, 2019

    @garasubo
    ContributorAuthor

    Thanks. I updated the description to make it clear what I want to do.

  5. Osspial commented on Dec 2, 2019

    @Osspial
    Contributor

    #753 has a lot of good discussion on both IME handling and the broader context of how to improve the keyboard input API.

  6. garasubo commented on Dec 3, 2019

    @garasubo
    ContributorAuthor

    That issue looks like this issue as well, but haven't updated for a while. Is there any ongoing work related to that issue?

  7. garasubo commented on Dec 6, 2019

    @garasubo
    ContributorAuthor

    I'm not sure I fully understood the discussion on #753, but the most concern there is something how to represent pressed keys rather than IME status. I'm thinking about adding a new member into KeyboardEvent to have IME status corresponding to that keyboard event. What do you think? @Osspial

  8. garasubo commented on Jan 24, 2020

    @garasubo
    ContributorAuthor

    Submitted a PR for adding new IME events for X11. Could anyone review it?

  9. murarth commented on Mar 6, 2020

    @murarth
    Contributor

    The X11 implementation has been merged (to the composition-event branch) and I've opened a tracking issue (#1497) to coordinate implementation of this API for each remaining platform. Thank you, @garasubo, for your work on this API and the X11 implementation.

    I am now closing this issue. Any further discussion of this feature should take place in #1497.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C - needs discussionDS - x11S - apiS - enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions