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
x11: Add XIM support #11657
x11: Add XIM support #11657
Conversation
Signed-off-by: npmania <np@mkv.li>
We require contributors to sign our Contributor License Agreement, and we don't have @npmania on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
The cla-bot has been summoned, and re-checked this pull request! |
out2.mp4Here's a short video testing English, BQN, Korean, Japanese and Chinese input. |
Signed-off-by: npmania <np@mkv.li>
Signed-off-by: npmania <np@mkv.li>
Signed-off-by: npmania <np@mkv.li>
Signed-off-by: npmania <np@mkv.li>
Thank you for this work, it's been needed! Can you tell me a bit more about xim-rs? Is there a compelling reason to use it, rather than handling the xim messages ourselves? |
The XIM protocol is not implemented in XCB, so communicating with XIM with the current xcb_ffi would require manual parsing of the XIM protocol. xim-rs provides an XIM protocol parsing interface over x11rb client, allowing non-blocking communication with the XIM server. |
Gotcha thanks for the context! I did some reading and research on XIM and have a better understanding of how this all fits together now :D |
See handle_key_event on macOS for a rough guide on how IME and keyevents should interact. https://github.com/zed-industries/zed/blob/main/crates/gpui/src/platform/mac/window.rs#L1202-L1307 |
Signed-off-by: npmania <np@mkv.li>
Signed-off-by: npmania <np@mkv.li>
Seems that this PR needs a cargo fmt |
Signed-off-by: npmania <np@mkv.li>
Oops, fixed formatting on the last commit. I believe I've ran typo checker and clippy already, so hopefully the rest will be fine. |
@aohanhongzhi Please provide me about your setup so I can reproduce it on my environment. |
This pull request adds XIM (X Input Method) support to x11 platform. The implementation utilizes [xim-rs](https://crates.io/crates/xim), a XIM library written entirely in Rust, to provide asynchronous XIM communication. Preedit and candidate positioning are fully supported in the editor interface, yet notably absent in the terminal environment. This work is sponsored by [Rainlab Inc.](https://rainlab.co.jp/en/) Release Notes: - N/A --------- Signed-off-by: npmania <np@mkv.li>
I was able to reproduce that this is the
|
@eatradish Thanks a lot! I will try to investigate into this issue in a few days. |
This pull request adds XIM (X Input Method) support to x11 platform.
The implementation utilizes xim-rs, a XIM library written entirely in Rust, to provide asynchronous XIM communication.
Preedit and candidate positioning are fully supported in the editor interface, yet notably absent in the terminal environment.
This work is sponsored by Rainlab Inc.
Release Notes: