-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Support IME events abstraction #7315
Copy link
Copy link
Closed
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and morePlayer input via keyboard, mouse, gamepad, and moreC-FeatureA new feature, making something new possibleA new feature, making something new possible
Metadata
Metadata
Assignees
Labels
A-InputPlayer input via keyboard, mouse, gamepad, and morePlayer input via keyboard, mouse, gamepad, and moreC-FeatureA new feature, making something new possibleA new feature, making something new possible
What problem does this solve or what need does it fill?
To be honest, not having input method support can be seen as a bug, which even makes me discouraged from
bevy. Whether it is a GUI integration made by someone else (such asbevy_egui) or a GUI system made by ourselves, sooner or later it will have to deal with the problem of input methods. For users like us, GUI systems without input method support are not usable, so I hope we can take a small step in this regard by providing the ability to handle IME events with an abstract API.What solution would you like?
The definition of these events should probably be put in bevy_window/events.rs, and then we convert these events in the backend. For
winit, the definition of these events can be found atwinit::event::ime. Notice that we need to add methods that provide access towindow.set_ime_position.What alternative(s) have you considered?
I guess you can only enter CJK characters by copy-pasting. I have to say it's very bad UX.
Additional context
Here is a pull request that adds IME support to
egui_winit: emilk/egui#2046and a solution for web: emilk/egui#253