Qalculate / qalculate-gtk

Qalculate! GTK+ UI
https://qalculate.github.io/
GNU General Public License v2.0
948 stars 68 forks source link

Can't write in English while Japanese layout with alphanumeric input mode selected (English mode) #80

Open SemperPeritus opened 5 years ago

SemperPeritus commented 5 years ago

Japanese layout can be used for both, English and Japanese typing. That's why people with Japanese layout usually have not English layout. Usually to write 1 japanese character you need to type 2 keys (K + A for か character, for example) but while using alphanumeric input mode, Windows and any program equal it to English typing (106/109 keyboard have a little different layout, but keycodes are equal). While using alphanumeric input mode ("A" key = "A" English keycode, the same as for English layout) qalculate read it like rare Japanese input mode when 1 key equals 1 character (used by <2%). Meanwhile I don't using this input mode and never used it. Qalculate is a first program with this behavior I ever used. "1 key equals 1 character" mode (May be it called kana hardware mode) in Windows defining global and only one mode can be used, You can't change this mode without Control Panel, so this is not Windows bug or my mistake, qalculate or gtk read English keycode and write it as Japanese character, even Windows IME does not appear so "1 key = 1 character" mode is turned off, it just looks like this mode. I had the save behavior with qalculate about a year ago on another Windows instance (the same device, but I reinstalled it). You can test it on any keyboard layout. I tested it on 101/102 and 106/109 layouts and 101/102 and 106/109 keyboard both (each by each, 4 test total).

OS: Windows 10 Pro 64-bit (Version 1809, Build 17763.292).

image

astrorobot110 commented 5 years ago

Still have trouble with v2.9.

hanna-kn commented 5 years ago

I do not know how to solve this issue (or even how to test it myself). Because there is no input method related code in Qalculate!, this is presumable an issue in the GTK+ library or the specific GTK+ library in MinGW. Perhaps you could try setting the environment variable GTK_IM_MODULE to "ime".

SemperPeritus commented 5 years ago

@hanna-kn GTK_IM_MODULE does not works for me, but now I noticed one more thing. It does not depends on GTK_IM_MODULE env var equals ime, "ime" or does not exists, but on every app opening there is chance to it works properly (about 20-30%).

astrorobot110 commented 5 years ago

Hmmmmm...Sadly I am a noob in programming, but I found same trouble in "gimp". Hope to help you.

https://gitlab.gnome.org/GNOME/gimp/issues/1603 https://gitlab.gnome.org/GNOME/glib/issues/1421

SemperPeritus commented 5 years ago

Hmmmmm...Sadly I am a noob in programming, but I found same trouble in "gimp". Hope to help you.

https://gitlab.gnome.org/GNOME/gimp/issues/1603 https://gitlab.gnome.org/GNOME/glib/issues/1421

GIMP works fine for me while I have issue with qalculate.

hanna-kn commented 5 years ago

I think I've find a solution. Rename the binary from qalculate.exe to qalculate-gtk.exe.

SemperPeritus commented 5 years ago

I think I've find a solution. Rename the binary from qalculate.exe to qalculate-gtk.exe.

😏 Is it joke? I tried it anyway, but did not notice the results.

hanna-kn commented 5 years ago

I think I've find a solution. Rename the binary from qalculate.exe to qalculate-gtk.exe.

smirk Is it joke? I tried it anyway, but did not notice the results.

No joke. For some reason (qalculate-gtk.exe is the original name of the binary) it did actually work, consistently, until I rebooted... :disappointed:

GIMP uses gtk+2, not gtk+3. The same behaviour can be observed with gtk3-demo.

Running the application in compatibility mode does however seem to work consistently even after reboot...

astrorobot110 commented 5 years ago

Hmmmmm...Sadly I am a noob in programming, but I found same trouble in "gimp". Hope to help you. https://gitlab.gnome.org/GNOME/gimp/issues/1603 https://gitlab.gnome.org/GNOME/glib/issues/1421

GIMP works fine for me while I have issue with qalculate.

I test it, but not fine.

GIMP works fine for me while I have issue with qalculate.

I think it already fixed because this case in gimp fonud 8 month ago. and glib was updated. btw, can I fix manually in overwrite fixed glib library?

hanna-kn commented 5 years ago

If glib is the issue, than it shouldn't matter that GIMP uses GTK+ 2. Unfortunately it is not possible (will not run) to only replace the glib library. Related library must likely be compiled against the old glib version (and possibly glib against current versions of dependencies).

The GIMP bug seems to indicate that this problem only exists for 32-bit binaries. I've compiled a 64-bit version (https://github.com/Qalculate/qalculate-gtk/releases/download/v2.9.0/qalculate-2.9.0-x64.msi) which so far works without issues in my tests. For the 32-bit version I recommend trying Windows 8 compatibility mode.

astrorobot110 commented 5 years ago

Seems everything works fine in x64 installer. And sorry, I don't check win8 compatibility mode at 2.9.0.

SemperPeritus commented 5 years ago

If glib is the issue, than it shouldn't matter that GIMP uses GTK+ 2. Unfortunately it is not possible (will not run) to only replace the glib library. Related library must likely be compiled against the old glib version (and possibly glib against current versions of dependencies).

The GIMP bug seems to indicate that this problem only exists for 32-bit binaries. I've compiled a 64-bit version (https://github.com/Qalculate/qalculate-gtk/releases/download/v2.9.0/qalculate-2.9.0-x64.msi) which so far works without issues in my tests. For the 32-bit version I recommend trying Windows 8 compatibility mode.

Seems everything works fine in x64 installer. And sorry, I don't check win8 compatibility mode at 2.9.0.

Win 8 compatibility mode in Win 10 Pro 1809 64-bit works fine for v2.8.2 32-bit too (installed via choco, v2.9.0 is broken now in choco, I already have write to maintainer).