https://bugs.winehq.org/show_bug.cgi?id=48151
Bug ID: 48151 Summary: AceMoney (or any other non-unicode program): can't enter cyrillic letters into text fields when using custom keyboard layout Product: Wine Version: 4.20 Hardware: x86 OS: Mac OS X Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: ttyusupov@gmail.com
macOS version: 10.14.6 (18G1012) Link to a free version of the app: http://cdn.mechcad.net/downloads/AceMoneyLiteSetup.exe
How to reproduce: 1) Install custom keyboard layout with Cyrillic support, for example: https://github.com/asizikov/osx-russian-keyboard 2) Setup AceMoneyLite under Wine. Actually you don't need even complete setup - you can just run the installer and try to type Cyrillic letter using custom keyboard layout into a text field where it asks for the path to install.
Expected result: - Cyrillic letters entered and shown correctly.
Actual result: - Cyrillic letters are entered and displayed as question marks '?'.
Note: I've used LANG, LC_ALL and other variables with different values including ru_RU.UTF-8 - this help with showing text labels, but doesn't affect entering Cyrillic letters into text field for non-unicode apps.
https://bugs.winehq.org/show_bug.cgi?id=48151
--- Comment #1 from Ken Thomases ken@codeweavers.com --- Is this specific to custom keyboard layouts, or does it also occur with the Apple-provided Russian keyboard layouts?
At first impression, it seems like it's more a display issue (the font for the control doesn't contain glyphs for the Cyrillic characters) than an input problem.
If you could gather a +key,+keyboard,+event log of typing in such a field (try not to do anything else with the keyboard for that session), that may help.
https://bugs.winehq.org/show_bug.cgi?id=48151
--- Comment #2 from Timur ttyusupov@gmail.com --- This is specific to custom keyboard layouts, even if I generate them from system ones provided by Apple. When using Russian system layout - Cyrillic letters are displayed correctly.
Also if I copy Russian text from outside of wine and paste it into text field - this also works fine. So, looks like the issue is related to input and custom keyboard layouts specifically.
Can you share which command line, environment variables or config settings can I use to gather logs you are asking for?
https://bugs.winehq.org/show_bug.cgi?id=48151
--- Comment #3 from Ken Thomases ken@codeweavers.com --- (In reply to Timur from comment #2)
This is specific to custom keyboard layouts, even if I generate them from system ones provided by Apple. When using Russian system layout - Cyrillic letters are displayed correctly.
Also if I copy Russian text from outside of wine and paste it into text field - this also works fine. So, looks like the issue is related to input and custom keyboard layouts specifically.
Yeah. That's weird.
Can you share which command line, environment variables or config settings can I use to gather logs you are asking for?
https://wiki.winehq.org/FAQ#How_do_I_get_a_debug_trace.3F
Thanks!
https://bugs.winehq.org/show_bug.cgi?id=48151
--- Comment #4 from Timur ttyusupov@gmail.com --- Created attachment 65806 --> https://bugs.winehq.org/attachment.cgi?id=65806 Entering Cyrillic letters using "Russian - PC" standard macOS keyboard layout.
https://bugs.winehq.org/show_bug.cgi?id=48151
--- Comment #5 from Timur ttyusupov@gmail.com --- Created attachment 65807 --> https://bugs.winehq.org/attachment.cgi?id=65807 Entering Cyrillic letters using "Russian - BG46" custom macOS keyboard layout.
https://bugs.winehq.org/show_bug.cgi?id=48151
--- Comment #6 from Timur ttyusupov@gmail.com --- I've attached logs from two scenarios: 1) Entering Cyrillic letters using "Russian - PC" standard macOS keyboard layout. 2) Entering Cyrillic letters using "Russian - BG46" custom macOS keyboard layout.
For both, I was entering the same 4 Cyrillic letters "фыва" (same keys as "asdf", but using Russian keyboard layout). Also, I've selected keyboard layout before switching to the app inside wine and copied the log before closing the app to avoid unnecessary keyboard events.
https://bugs.winehq.org/show_bug.cgi?id=48151
--- Comment #7 from Timur ttyusupov@gmail.com --- Created attachment 65808 --> https://bugs.winehq.org/attachment.cgi?id=65808 Entering Cyrillic letters using custom copy of "Russian - PC" keyboard layout.
I've created a custom copy of the "Russian - PC" standard keyboard layout using instruction from https://superuser.com/a/665726. Recorded a log using this custom layout to enter the same letters (this also produced '?' in the input field).
https://bugs.winehq.org/show_bug.cgi?id=48151
--- Comment #8 from Ken Thomases ken@codeweavers.com --- The logs show that Wine is interpreting the keys correctly. It translates them to the proper Unicode characters. The only difference in behavior among the logs is the HKL (Windows handle to a keyboard layout) associated with each Mac keyboard layout.
(In reply to Timur from comment #7)
I've created a custom copy of the "Russian - PC" standard keyboard layout using instruction from https://superuser.com/a/665726. Recorded a log using this custom layout to enter the same letters (this also produced '?' in the input field).
Did you save it as a .keylayout file or a bundle? I did a bit of experimenting with Ukelele and, when it saves as a bundle, it includes a key ("TISIntendedLanguage") in the bundle's Info.plist file for the language ("ru"). There doesn't seem to be any indication of language in .keylayout files.
Wine has to generate a keyboard-layout handle (HKL) to report to Windows apps. That HKL is based on the language code ID. It appears that Wine is not able to determine the language of your custom keyboard layouts. That probably leads the app to use an incorrect code table when interpreting the characters generated by the key events.
https://bugs.winehq.org/show_bug.cgi?id=48151
--- Comment #9 from Timur ttyusupov@gmail.com ---
(In reply to Timur from comment #7)
I've created a custom copy of the "Russian - PC" standard keyboard layout using instruction from https://superuser.com/a/665726. Recorded a log using this custom layout to enter the same letters (this also produced '?' in the input field).
Did you save it as a .keylayout file or a bundle?
I saved it as a .keylaout file.
I did a bit of experimenting with Ukelele and, when it saves as a bundle, it includes a key ("TISIntendedLanguage") in the bundle's Info.plist file for the language ("ru"). There doesn't seem to be any indication of language in .keylayout files.
I just tried to convert .keylayout file from https://github.com/asizikov/osx-russian-keyboard into a bundle and install it. And that worked fine - I was able to type Russian letters into input fields.
Thanks a lot!