mike-fabian / ibus-typing-booster

ibus-typing-booster is a completion input method for faster typing
https://mike-fabian.github.io/ibus-typing-booster/
Other
226 stars 15 forks source link

[BUG] Gnome Wayland, Fedora 40: Gnome keyboard shortcuts don’t work when Typing Booster has focus #507

Closed mike-fabian closed 5 months ago

mike-fabian commented 5 months ago

Originally reported here: https://bugzilla.redhat.com/show_bug.cgi?id=2272023

Fix attempt by Takao Fujiwara (Thank you very much!): https://src.fedoraproject.org/rpms/ibus-typing-booster/pull-request/39#request_diff

mike-fabian commented 5 months ago

Happens in Fedora 40 with:

mutter-46.0-1.fc40.x86_64
gnome-shell-46.0-1.fc40.x86_64
mike-fabian commented 5 months ago

Doesn’t happen in Fedora 39 with:

mutter-45.5-1.fc39.x86_64
gnome-shell-45.5-1.fc39.x86_64
mike-fabian commented 5 months ago

Workaround:

Use the option:

☑️ Avoid using the forward_key_event() function

Screenshot

mike-fabian commented 5 months ago

The attempted fix in https://src.fedoraproject.org/rpms/ibus-typing-booster/pull-request/39#request_diff is unfortunately not sufficient because this does not only happen with Gnome keyboard shortcuts involving Super (Mod4) but with any Gnome keyboard shortcuts.

For example, “Move window” is by default set to Alt+F7 and when ibus-typing-booster has keyboard focus, this does not work either unless the ☑️ Avoid using the forward_key_event() function option is used.

Screenshot

fujiwarat commented 5 months ago

Current my patch checks key.mod4 only but probably that API needs to return False with other modifier keys. I.e. if ibus-typing-booster manages Alt-F7 shortcut key with a customized shortcut key, it should be handled before the API is called.

mike-fabian commented 5 months ago

Current my patch checks key.mod4 only but probably that API needs to return False with other modifier keys. I.e. if ibus-typing-booster manages Alt-F7 shortcut key with a customized shortcut key, it should be handled before the API is called.

Yes, I think so too.

mike-fabian commented 5 months ago

Surprisingly, Gnome keyboard shortcuts without modifiers like F7 work even when the key is forwarded using forward_key_event(). Only when a modifier is involved (Shift+F7, Control+F7, Alt+F7, Super+F7,...) the Gnome keyboard shortcut does not work when ibus-typing-booster forwards the key event using forward_key_event().