Public bug reported: GTK+3 will emit spurious "key_press_event" if the focus is currently on "GtkEntry" and the locale is set to th_TH.UTF-8. This issue seems to disappear if the locale is set to something else (tested with C.UTF-8 and en_US.UTF-8), and the presence of iBus and gnome-shell affects this.
Step to reproduce: 1. Boot into Xubuntu. Install package "language-pack-th" (for locale) and "libgtk-3-dev" for compiling demo program. 2. Download & compile the demo program "gtk3-entry-keyboard-event" attached in this bug. (The program is licensed under MIT.) 3. Run the program with LANG=th_TH.UTF-8. The window will contain an input box on top and a button on the bottom. 4. Click in the input box, then press a key on the keyboard. The program will print one line for each "key_press_event" delivered to the window, with keyval and hardware_keycode. Expected result: only a single line is printed. For example for "a": "window: 0x0061 0x0026" Actual result: - With LANG=th_TH.UTF-8, two lines are printed. The first line is the above line, while the second line has both values as zero: "window: 000000 000000" - If, instead, the locale is LANG=C.UTF-8, the program will print only one line as expected. - If iBus is installed and enabled, then 2 lines are printed with both lines containing the same code, no matter which locale it runs under. - If this same program is run in Gnome-based Ubuntu session, then only one line is printed no matter which locale it runs under. This program is tested on Fedora and Manjaro with the correct result. Thus, this issue is Ubuntu-specific. I've tested it on Ubuntu 19.10 with pretty much the same result, except the iBus case is now working correctly. ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: libgtk-3-0 3.22.30-1ubuntu4 ProcVersionSignature: Ubuntu 4.15.0-65.74-generic 4.15.18 Uname: Linux 4.15.0-65-generic x86_64 ApportVersion: 2.20.9-0ubuntu7.7 Architecture: amd64 CurrentDesktop: XFCE Date: Sat Oct 19 18:06:23 2019 InstallationDate: Installed on 2018-05-03 (533 days ago) InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426) SourcePackage: gtk+3.0 UpgradeStatus: No upgrade log present (probably fresh install) ** Affects: gtk+3.0 (Ubuntu) Importance: Undecided Status: New ** Tags: amd64 apport-bug bionic ** Attachment added: "The demo program demonstrating the bug." https://bugs.launchpad.net/bugs/1848865/+attachment/5298410/+files/gtk3-entry-keyboard-event.c -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to gtk+3.0 in Ubuntu. https://bugs.launchpad.net/bugs/1848865 Title: Spurious "key_press_event" when focus on entry widget using LANG=th_TH.UTF-8 Status in gtk+3.0 package in Ubuntu: New Bug description: GTK+3 will emit spurious "key_press_event" if the focus is currently on "GtkEntry" and the locale is set to th_TH.UTF-8. This issue seems to disappear if the locale is set to something else (tested with C.UTF-8 and en_US.UTF-8), and the presence of iBus and gnome-shell affects this. Step to reproduce: 1. Boot into Xubuntu. Install package "language-pack-th" (for locale) and "libgtk-3-dev" for compiling demo program. 2. Download & compile the demo program "gtk3-entry-keyboard-event" attached in this bug. (The program is licensed under MIT.) 3. Run the program with LANG=th_TH.UTF-8. The window will contain an input box on top and a button on the bottom. 4. Click in the input box, then press a key on the keyboard. The program will print one line for each "key_press_event" delivered to the window, with keyval and hardware_keycode. Expected result: only a single line is printed. For example for "a": "window: 0x0061 0x0026" Actual result: - With LANG=th_TH.UTF-8, two lines are printed. The first line is the above line, while the second line has both values as zero: "window: 000000 000000" - If, instead, the locale is LANG=C.UTF-8, the program will print only one line as expected. - If iBus is installed and enabled, then 2 lines are printed with both lines containing the same code, no matter which locale it runs under. - If this same program is run in Gnome-based Ubuntu session, then only one line is printed no matter which locale it runs under. This program is tested on Fedora and Manjaro with the correct result. Thus, this issue is Ubuntu-specific. I've tested it on Ubuntu 19.10 with pretty much the same result, except the iBus case is now working correctly. ProblemType: Bug DistroRelease: Ubuntu 18.04 Package: libgtk-3-0 3.22.30-1ubuntu4 ProcVersionSignature: Ubuntu 4.15.0-65.74-generic 4.15.18 Uname: Linux 4.15.0-65-generic x86_64 ApportVersion: 2.20.9-0ubuntu7.7 Architecture: amd64 CurrentDesktop: XFCE Date: Sat Oct 19 18:06:23 2019 InstallationDate: Installed on 2018-05-03 (533 days ago) InstallationMedia: Xubuntu 18.04 LTS "Bionic Beaver" - Release amd64 (20180426) SourcePackage: gtk+3.0 UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gtk+3.0/+bug/1848865/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp