Bug 1999552 - forward_key_event() is broken in gtk4
Summary: forward_key_event() is broken in gtk4
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk4
Version: 35
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-31 10:04 UTC by Mike FABIAN
Modified: 2022-12-13 15:34 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-12-13 15:34:42 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Video showing the problem, neither forwarding a space nor returning it as False works. (178.21 KB, video/mp4)
2021-08-31 10:04 UTC, Mike FABIAN
no flags Details

Description Mike FABIAN 2021-08-31 10:04:43 UTC
Created attachment 1819321 [details]
Video showing the problem, neither forwarding a space nor returning it as False works.

In the Search Entry in gtk4-demo sending a space with forward_key_event()
produces the letter “n” instead of “ ”, sending the space key
by returning False from do_process_key_event() puts the space *before* the 
committed string, i.e. typing "a " results in " a" when the space is send
by returning False.

[mfabian@fedora ~]$ rpm -qf /usr/bin/gtk4-demo
gtk4-devel-4.4.0-1.fc35.x86_64

See attached video.

Comment 1 fujiwara 2021-09-03 11:18:59 UTC
As I said before, currently ibus core calculates the keycodes from keysyms if engines forward keycode=0 and it's no longer handled in gtk4.

The following change works fine with me.

--- /usr/share/ibus-typing-booster/engine/hunspell_table.py.orig
+++ /usr/share/ibus-typing-booster/engine/hunspell_table.py
@@ -5267,7 +5267,7 @@ class TypingBoosterEngine(IBus.Engine):
             # https://bugzilla.redhat.com/show_bug.cgi?id=1291238
             if self._qt_im_module_workaround:
                 return self._return_false(key.val, key.code, key.state)
-            self.forward_key_event(key.val, key.code, key.state)
+            self.forward_key_event(key.val, 0, key.state)
             return True
 
         if key.unicode:

Comment 2 fujiwara 2021-09-03 11:24:12 UTC
I mean ibus in Xorg. I don't discuss about the issue in mutter yet.

Comment 3 Ben Cotton 2022-11-29 17:03:57 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 4 Ben Cotton 2022-12-13 15:34:42 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.