Repository navigation
Conversation
This was referenced Oct 22, 2026
The query was built from raw key events on a plain Item, which Qt never hands to an input method, so fcitx5/ibus users could not type Chinese, Japanese or Korean. Use an invisible TextInput as the key catcher: keys still go through handleKey first, IME commits are forwarded to the query or the action panel filter, and the preedit is shown in the search field next to the caret.
Author
|
Rebased onto the latest main to resolve the conflicts with #28.
Tested on Omarchy 4.0.6 with fcitx5 + Rime. |
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.
Problem
With fcitx5 (or ibus) running, Chinese/Japanese/Korean can't be typed into the launcher: pinyin keystrokes land in the query as plain Latin letters and no candidate window appears.
The search field is a
Text, and keys are caught by a plainItem(keyCatcher) whoseKeys.onPressedappendsevent.textto the query. Qt only enables the platform input context for a focused item that accepts input methods (TextInput/TextEdit), so the IME is never engaged — even withQT_IM_MODULE=fcitxset and the fcitx5 Qt6 plugin installed.Change
keyCatcherbecomes an invisibleTextInput(inplugin/ui/LauncherWindow.qml):handleKeyfirst (Keys.priority: Keys.BeforeItem), so typing Latin text, navigation and every shortcut behave exactly as before.TextInputand is immediately moved into the query (or the action panel filter when Ctrl+K is open), then the input is cleared.preeditText) is shown in the search field, and the caret follows it.TextInputsits on the caret, so the IME's candidate window opens right under the query.Qt.inputMethod.reset()on hide, so an unfinished composition doesn't carry over to the next open.The Keyboard line of the Status section in
CLAUDE.mdnotes the input method support.Testing
node --test tests/*.test.js: 88/88 pass.oma-cast show, switch fcitx5 to pinyin, typenihao→ preeditni haoshows in the search field with the candidate window below it; space commits你好into the query and the Google/DuckDuckGo/agent fallbacks for你好appear.handleKeypath.