Bug 477701 - [fcitx5 & Wayland input method] In Application Launcher and on Desktop, Input method only triggers when focused on text fields
Summary: [fcitx5 & Wayland input method] In Application Launcher and on Desktop, Input...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: input (show other bugs)
Version: 5.27.7
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2023-11-29 04:52 UTC by unblended_icing552
Modified: 2023-11-29 21:25 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description unblended_icing552 2023-11-29 04:52:21 UTC
SUMMARY
Application Launcher and Desktop (krunner) have a feature such that you can directly start typing to search, without having to focus on the search text field first.

However, input method engine only triggers when the current focus is on a text field, this has the side effect that when you directly type to search, the first key press never goes to input method but instead typed as is.

On a system with CJK display language where the application names usually start with a CJK character, this slows down the searching experience as you have to explicitly focus the text field before start typing in order to utilize input method engine.

STEPS TO REPRODUCE
1. Install fcitx5 engine and add any input method (Optionally enable `Share Input State` in fcitx5 settings)
2. Activate input method
3. Application Launcher:
   - Press `Meta` key, and start typing directly
   Desktop:
   - Show desktop (Meta + D), then start typing directly

OBSERVED RESULT
The first key press produces an alphabetic character, the following key presses are proceeded by input method engine.

EXPECTED RESULT
The first key press should already trigger input method engine.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.29.0
Qt Version: 5.15.3
X11 session

Note: This occurs with Wayland session on Plasma 5.27 as well but I currently don't have access to my openSUSE Tumbleweed system (broken hard disk) to reproduce it. The issue is reproducible on my current Kubuntu system.

ADDITIONAL INFORMATION
fcitx5 Qt IM module (with X11 session on KDE Plasma 5.24.7)
and Wayland input method (with Wayland session on KDE Plasma 5.27, by setting the Virtual Keyboard) both have this issue.

I feel like this is more of a KDE issue than a fcitx5 issue, so the bug report goes here.

An alternate solution to this bug is to support searching CJK names by typing the corresponding key codes directly, such that `浏览器` could be found by string `llq` or `liulanqi` in krunner.