Closed mike-fabian closed 2 years ago
Now I try to avoid using forward_key_event() after a commit if the key to forward has a Unicode character and is not Return or Enter and no modifier keys are pressed. In that case I can avoid using forward_key_event() by committing a string containing that Unicode character instead. This works no matter what the key code was.
The fix/workaround for this is included in
https://github.com/mike-fabian/ibus-typing-booster/releases/tag/2.19.8
See: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5930#note_1573938
I thought this only happens when ibus-typing-booster was automatically enabled, not when selected manually in the Gnome panel.
But sometimes it happens also when ibus-typing-booster was selected manually. It seems to depend on whether the automatically selected typing booster or the manually selected typing booster was started first: After an
ibus restart
in Gnome Wayland, the problem may occur both in the automatically and the manually selected typing booster, depending on the order they are started.The problem occurs when the
do_process_key_event()
function receives the space like this:I.e. with a key value
32
and a key code of0
.Then,
self.forward_key_event(key.val, key.code, key.state)
with0
askey.code
fails.(I think ibus calculates the key code when 0 is given, but this doesn’t seem to work).
The problem does not occur when the
do_process_key_event()
function receives the space like this:I.e. with
57
as thekey.code
for the space.57
is the correct ibus key code for space (ibus key codes are calculated by subtracting 8 from the “normal” key codes).I don’t know why the incoming space key from the OSK sometimes does have
0
instead of the correct key code.