-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
IME Support #248
Comments
It's being worked on in #247 ! |
As far as I can tell that PR is unrelated? On PC there needs to be a proper hook to pass composition events into egui. That PR seems like a "fix" at the egui_web level. |
Ah, I read your issue to quickly! Yeah, #247 is IME for web, but you want IME for desktop. |
Please let me do it. I have a plan on it, and, it is important to me, too. |
@n2 cool! I have other projects to work on so that'd be great. I think all you'd have to do in the egui space is to add Composition and CompositionEnd events and then add those to text inputs' caches state, displaying em at the cursor and clearing when the composition ends. Note that right now winit doesnt support any of this either so it will only work on web. I personally think having an invisible textbox that steals focus and fires egui events is better than implementing the whole thing in egui_web or whatever it is you're doing (for extensibility's sake) |
Thank you for your advise @lunabunn . Hidding text element(called agent) on web was what I did in #247 .
So, below is my plan:
If you have any idea, please tell me, suggestions are welcome. |
@n2 Ah, right. I know see what you're trying to do. Personally, I'd prefer to split this into the 2 parts (separate issues?):
|
@lunabunn The official native backend is |
Ah, sorry, missed that. Regardless though, winit does not have IME support at the moment (beyond setting the IME position as you mentioned) so it's largely irrelevant. I guess we could add a third part? |
Yes, these three parts are exactly the same thing in the table above: @lunabunn
|
Mhm. I was mainly noting that those should be separate issues, as well as the actual impl within |
How much work is left on this? Is it done? |
It's done, I think. Sorry for not informing you. |
On the contrary - thanks for making it done :D |
@SheldonNico ooh, nice! Yeah, if you want to make a PR that would be awesome! |
Update: IME now support Windows/MacOS/Linux. |
Update (April 2021):
Since this issue was initially opened, good progress has been made on IME support.
#258 Implemented proper candidate window positioning for
egui_web
#278 Implemented IME composition events for
egui
as well as logic to fire them foregui_web
This means
egui_web
, as well as coreegui
, now has IME support. (Thanks @n2 !)However,
eframe
on native targets still DOES NOT have IME support. And withegui-glium
(and many otherwinit
-based egui backends), it is unlikely support will land any time in the near future. This is not an egui issue but rather an upstream issue. The biggest blocker is rust-windowing/winit#1497.winit
currently does not have IME support, which means most of the Rust ecosystem does not have IME support. Glium/glutin are no exception.egui-miniquad
, despite not relying onwinit
, also has a similar issue becausesokol-app
,miniquad
's windowing library of choice, doesn't have IME support either. The only egui backend listed in the README that would be able to support IMEs isegui_sdl2_gl
. I opened an issue there.Original issue:
Describe the bug
There are no events available for IME composition, nor do text inputs display IME composition strings. The candidate window is not shown in the appropriate location.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
There are events available for when the IME composition string/state changes, and text inputs display said string/state correctly. The candidate window should be shown right below the cursor.
Screenshots
N/A
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Additional context
IME support is a(n often overlooked) must for many people around the world in any sort of production GUI.
The text was updated successfully, but these errors were encountered: