Skip to content
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

Improve IME event handling #1293

Closed
garasubo opened this issue Nov 29, 2019 · 8 comments · Fixed by #1404
Closed

Improve IME event handling #1293

garasubo opened this issue Nov 29, 2019 · 8 comments · Fixed by #1404
Labels
C - needs discussion Direction must be ironed out DS - x11 S - api Design and usability S - enhancement Wouldn't this be the coolest?

Comments

@garasubo
Copy link
Contributor

garasubo commented Nov 29, 2019

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.

@goddessfreya goddessfreya added DS - x11 C - needs discussion Direction must be ironed out S - api Design and usability S - enhancement Wouldn't this be the coolest? labels Nov 29, 2019
@goddessfreya
Copy link
Contributor

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

@murarth
Copy link
Contributor

murarth commented Nov 29, 2019

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

@garasubo
Copy link
Contributor Author

garasubo commented Dec 2, 2019

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

@Osspial
Copy link
Contributor

Osspial commented Dec 2, 2019

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

@garasubo
Copy link
Contributor Author

garasubo commented Dec 3, 2019

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

@garasubo
Copy link
Contributor Author

garasubo commented Dec 6, 2019

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

@garasubo
Copy link
Contributor Author

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

@murarth
Copy link
Contributor

murarth commented Mar 6, 2020

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
Labels
C - needs discussion Direction must be ironed out DS - x11 S - api Design and usability S - enhancement Wouldn't this be the coolest?
Development

Successfully merging a pull request may close this issue.

4 participants