Created attachment 113419 [details] New tag box location Premise: Chinese, Japanese and Korean have way too many letters. Unlike western languages which can be input directly from a keyboard, CJK languages are typically input using a helper application that translates latin-formatted pronunciation into actual letters: INPUT [HUI HUA] >> OUTPUT [绘画] (Chinese word for drawing). On Linux, we call these helpers "Input sources", and we generally have two choices for Input Source Framework: ibus (GNOME) or fcitx (KDE) and scim. These are the base services for loading different input schemes like: ibus-libpinyin, fcitx-libpinyin. On Windows, these are handled as the Input Methods (IMEs). The Bug itself: CJK input method cannot be used in Brush Preset Docker's New tag input box. It can be used in the docker's Search box, but not in the right-click menu's "New tag" box. When the cursor is in the Search box, I can trigger input method with Shift/Super+Space. But for some reason, I can neither trigger them in the "new tag" box. Even when I enter the new tag box with my input method turned-on, it can only input English. This bug happens on both Linux and Windows, and the symptoms are 100% identical. I suspect it to be a deficiency from Qt. Workaround: Copy and paste existing CJK letters directly into "New tag" box.
Maybe that's because this is in a popup, and the input thing is also a popup?
Created attachment 113420 [details] Input method at work in Brush Preset Docker's Search box Yeah, I think an input method can be counted as a on-canvas "popup".
Created attachment 113476 [details] [Windows Only] Cannot switch CJK input method in Rename Brush Preset input box
Created attachment 113477 [details] [Windows Only] Cannot switch CJK input method in Text Brush Tip's Text input box
I have an automatic daily Bugzilla search set up for "Korean" because I tend to work on text input issues across KDE (I live in Seoul and type Korean frequently). I am super busy currently, but I'll try to take a look at this soon.
Oh wait, this is Windows-specific? Then I might not be able to help, I only know Linux well :(.
(In reply to Eike Hein from comment #6) > Oh wait, this is Windows-specific? Then I might not be able to help, I only > know Linux well :(. Yes you can help, they are NOT exactly Windows specific. This one is Linux / Windows shared: https://bugs.kde.org/attachment.cgi?id=113419 Although tagged as Windows only, both Linux/Windows cannot switch input method in these boxes, although on Linux, I can switch to an input method before opening the popup and I can use it, while on Windows I cannot: https://bugs.kde.org/attachment.cgi?id=113476 https://bugs.kde.org/attachment.cgi?id=113477 I suspect a Qt issue here.
Maybe this is a duplicate https://bugs.kde.org/show_bug.cgi?id=395745 ?
(In reply to Boudewijn Rempt from comment #8) > Maybe this is a duplicate https://bugs.kde.org/show_bug.cgi?id=395745 ? Probably not. I cannot recreate the same situation with either Linux's or Windows's Chinese input source. I guess it was that bug is specific to a Korean input source.
Re-tested and Summary: ------------ ### Linux # Brush Preset Search box [Y] Input source can be switched [Y] Input source can be used # New Tag box [N] Input source can be switched [Y] Input source can be used ------------ ### Windows # Brush Preset Search box [Y] Input source can be switched [Y] Input source can be used # New Tag box [N] Input source can be switched [N] Input source can be used ------------ ### NOTES # Input source is toggled by: [Super] + [Space] # Input source's EN only mode is toggled by: [Shift] # Input source intercepts all keyboard inputs, but only in *SOME* input fields where it considers to be text input. For example, it doesn't work in password field. # My guess: It's either OS/DE or Krita is suppressing [Super] and [Shift] in some case; Or It's the input field of New Tag box not being recognized by Input Sources correctly.
Windragon just checked this, and it's still an issue -- and I still don't know what to do other than to change the tagging menu into a tagging dialog. That should do the trick...
Git commit 30754f5f40e2e6711a639a920fe62c8d4a2b2646 by Alvin Wong. Committed on 29/05/2021 at 12:41. Pushed by alvinwong into branch 'master'. Fix input method not working on popup widgets M +1 -0 libs/widgetutils/KisPopupButton.cpp https://invent.kde.org/graphics/krita/commit/30754f5f40e2e6711a639a920fe62c8d4a2b2646
@Tyson I think this commit fixes the issue, at least for me on Windows, without any adverse effects. Can you give it a test on both Windows and Linux with your input methods when it gets included in the upcoming nightly build?
(In reply to Alvin Wong from comment #13) > @Tyson I think this commit fixes the issue, at least for me on Windows, > without any adverse effects. Can you give it a test on both Windows and > Linux with your input methods when it gets included in the upcoming nightly > build? Thanks Alvin for solving this huge issue for CJK users. I will test it as soon as it's in the nightly and provide my feedback here.
Hi Alvin, I have tested both the Windows and Linux Nightlies: krita-nightly-x64-5.0.0-prealpha-30754f5f40-setup.exe krita-5.0.0-prealpha-30754f5-x86_64.appimage But unfortunately, neither of them worked for me. I will mark this as reopened.
Created attachment 138887 [details] The popup location where input method doesn't work To make sure we were on the same page, here is the screenshot of the popup location related to this bug.
I used fcitx under Linux, and Windows 10 (20H2/21H1)'s system input method (not 3rd party) during the testing. I could use them in all other Krita input boxes except the tag popup. When the cursor was focused on that popup with Input Method already enabled, it will immediately cease to keep its state and fallback to System Base Keyboard (English).
True, there are more popups with this behaviour. Maybe I should look into fixing it properly from within Qt instead?... I can try applying the same fix from Krita for them. Did you notice any more popups with this issue?
So far the popup in Comment 16 is the only one I know that still not working. You have fixed every other similar input boxes that I know of (if they were broken). Sorry I have only checked that one because it was why I reported this bug. I totally forgot we have other popups like this.
Git commit 8717078e17f9d3269103e6b37f31fb9689305fdd by Alvin Wong. Committed on 31/05/2021 at 18:03. Pushed by alvinwong into branch 'master'. Fix input method not working on new tag box M +24 -1 libs/resourcewidgets/TagActions.cpp https://invent.kde.org/graphics/krita/commit/8717078e17f9d3269103e6b37f31fb9689305fdd
Please let me know if it doesn't work, or if you find more popups with the same issue.
Git commit 94b6cbda3de3ad55cbf52230406545a505025308 by Alvin Wong. Committed on 01/06/2021 at 15:56. Pushed by alvinwong into branch 'krita/4.3'. Fix input method not working on popup widgets (cherry picked from commit 30754f5f40e2e6711a639a920fe62c8d4a2b2646) M +1 -0 libs/widgets/kis_popup_button.cc https://invent.kde.org/graphics/krita/commit/94b6cbda3de3ad55cbf52230406545a505025308
Git commit 53cd440f20d54909e3163982ea79a66e6364ec64 by Alvin Wong. Committed on 01/06/2021 at 16:13. Pushed by alvinwong into branch 'krita/4.3'. Fix input method not working on new tag box (cherry picked from commit 8717078e17f9d3269103e6b37f31fb9689305fdd) M +24 -1 libs/widgets/KoResourceItemChooserContextMenu.cpp https://invent.kde.org/graphics/krita/commit/53cd440f20d54909e3163982ea79a66e6364ec64
Created attachment 138924 [details] F5/F6 panel search box cannot switch input method after popup box switched Hi Alvin, Thank you for the last fix! Now the popups can switch input method. However, with that fix a new glitch has occurred: In F5/F6 panels, if I switched input method in a popup first, then I won't be able to switch input method in the search box. This issue doesn't affect Docker panels. The Docker panel's popup and search box remember their input method states individually. Workaround: Close and reopen the F5/F6 panel.
(In reply to Tyson Tan from comment #24) > However, with that fix a new glitch has occurred: > In F5/F6 panels, if I switched input method in a popup first, then I won't > be able to switch input method in the search box. This issue doesn't affect > Docker panels. The Docker panel's popup and search box remember their input > method states individually. I think this might be specific to Linux (or even specific DEs) because I can't seem to reproduce this on Windows. I can try fixing this later on master, but it will not be in the next 4.4 release.
(In reply to Alvin Wong from comment #25) > I think this might be specific to Linux (or even specific DEs) because I > can't seem to reproduce this on Windows. I can try fixing this later on > master, but it will not be in the next 4.4 release. No problem, Krita 4.4 doesn't support non-latin1 characters for tags anyway -- they disappear upon restarting Krita. And I was unable to reproduce the last glitch on Windows either. As long as the Windows version works, this doesn't need to be a priority. The Android version could be affected though. So it would be nice if we can get to the bottom of this before Krita 5.0 is out.
Sorry, I can't think of a reasonable method to fix the last issue without potentially breaking other things. I guess users will have to reopen the popup to fix it. I also tried to test it on Android, but my test system does not have a functional input method that supports a physical keyboard. It works with the on-screen keyboard though. It looks like the inability to use input methods in popups is "by design" (see [1]), so I suppose it is accidental that my workaround even works at all. [1]: https://bugreports.qt.io/browse/QTBUG-83490
(In reply to Alvin Wong from comment #27) > Sorry, I can't think of a reasonable method to fix the last issue without > potentially breaking other things. I guess users will have to reopen the > popup to fix it. > > I also tried to test it on Android, but my test system does not have a > functional input method that supports a physical keyboard. It works with the > on-screen keyboard though. > > It looks like the inability to use input methods in popups is "by design" > (see [1]), so I suppose it is accidental that my workaround even works at > all. > > [1]: https://bugreports.qt.io/browse/QTBUG-83490 No problem. It's not news to me that the limitations from libraries or even computer languages can make certain features unfeasible or impractical. CJK Input methods themselves are already a hack of some sort. At least you made it work for Windows and Android, and the glitch under Linux has easy and natural workaround. Thank you again for your effort! :D
Created attachment 139096 [details] Krita 5.0 Layer Filter input box Krita 5.0 Layer Filter input box cannot use input method. Windows only.
Created attachment 139097 [details] Krita 5.0 Popup shortcut list inpux box Krita 5.0 Popup Shortcut List (Ctrl+Enter) input box cannot use input method. Windows only.
The local community reported two more location where input method cannot be used. They affect only the Windows version. See Comment 29 and Comment 30 for screenshots. I'm using Linux so I wasn't able to find them last time, sorry.
For the second new issue I opened bug 438122 because that needs another approach at fixing.
Git commit ac9145a2b208f286458786c9aa4d12f94de507c9 by Alvin Wong. Committed on 08/06/2021 at 13:40. Pushed by alvinwong into branch 'master'. Use KisPopupSelfActivatingLineEdit for layer filter M +2 -1 libs/ui/widgets/kis_layer_filter_widget.cpp https://invent.kde.org/graphics/krita/commit/ac9145a2b208f286458786c9aa4d12f94de507c9
Git commit c61db8c268b04181462033eace0b4bf2a7e71b1b by Alvin Wong. Committed on 09/06/2021 at 07:16. Pushed by alvinwong into branch 'master'. Fix using input method in command bar Related: bug 438122 M +12 -1 libs/ui/KisMainWindow.cpp https://invent.kde.org/graphics/krita/commit/c61db8c268b04181462033eace0b4bf2a7e71b1b
Thank you again, Alvin! :D