feat: better IME 支持 (add preedit & commit event)#622
Open
Milk-COCO wants to merge 4 commits intonot-fl3:masterfrom
Open
feat: better IME 支持 (add preedit & commit event)#622Milk-COCO wants to merge 4 commits intonot-fl3:masterfrom
Milk-COCO wants to merge 4 commits intonot-fl3:masterfrom
Conversation
native/linux_x11: Fix dy value in raw_mouse_motion
Author
|
oh shit I can't even switch Chinese ime |
这段是ai写的不怨我!!qwq!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
更好地处理ime input!!
Better handling ime!!
我期望在所有平台上都支持这玩意,,
I expect this foobar to be supported on all platforms.
主要功能 / Main Feature
on_ime_preedit()回调,可以在用户确认前实时显示正在输入的文本(如拼音串)。on_ime_preedit()callback. The text being inputted (such as pinyin strings) can be displayed immediately before the user confirms.on_ime_commit()回调,传递选定的最终确定的字符串。on_ime_commit()callback. Pass the selected and finalized string.Such as:vault-macroquad/lib.rs
隐藏掉windows显示的那个丑陋的默认输入框,且在ime没开启时无法切换到非英文输入法。
Hide Windows's ugly default input box , and let cannot switch to non English input methods when ime is not enabled.
Tips
仅针对 Windows 平台!Linux (X11/Wayland) 和 macOS 的 is TODO!!
Windows only! (Linux (X11/Wayland) & macOS) 's is TODO!!
要更好地使用预编辑,需要在有预编辑文本时,在类似于key_up_event的回调内拦截输入以避免重复触发。
To use preedit better, it is necessary to intercept input within a callback similar to key_up_event() when there is some preedit text, to avoid repeated triggering.
例子 / Example
已在 Windows 10 上使用微软拼音测试
Tested with Microsoft Pinyin on Windows 10
且我只测了这一个输入法的中文输入所以肯定有很多bug!
And I only tested the Chinese input of this input method, so there must be many bugs!
纯macroquad(超级魔改版的)输入框的示例:vault-macroquad/examples/flow_textinp.rs
Example of a pure (super modded) Macroquad input box is at upper
(悄悄告诉你我还在这个repo里面写了独立的ui和事件系统)
(Secretly telling you, I also wrote another UI and event system in this repo)
i know it's feat but not fit TwT