IBus misbehaving when using the Wayland backend #9250
Replies: 7 comments 7 replies
-
|
I have the same issue, Ghostty on Niri, IBus, EndeavourOS. It can be very disruptive in certain work-cases. E.g. I was switching to Ghostty with vim up, and in insert mode. The next thing to do, was Esc, but this didn't work. Similarly, while at the command line, a thing I wanted to do after switching there was Ctrl+R. Having to type something is rather contraproductive in both cases. |
Beta Was this translation helpful? Give feedback.
-
|
I am having the exact same issue, Ghostty on Hyprland, IBus, CachyOS and vanilla Arch. |
Beta Was this translation helpful? Give feedback.
-
|
I have debugged this a bit, first time opening a zig source file ... edited in some of the logging in src/apprt/gtk/class/surface.zig Basically the variable im_composing is initially set to true for some reason. Whenever this is true, the handler returns early on stuff that corresponds with the failing things (return, Ctrl for Ctrl+R, pasting, etc). Having it set to false in imPreeditStart let me use this correctly whenever going to edit mode in the terminal (I have vi bindings). For the stuff happening after using dead-keys, for me just typing the ~ character to signify home, there is still an issue and the logs shows that unless it is a normal character, im_composing = true and nothing happens. ibus is referenced here and there in the code, but the handling is definately not fully correct in this setting. I start my ibus with type=Wayland. |
Beta Was this translation helpful? Give feedback.
-
|
I use Fcitx 5 myself and as such I've never encountered this issue — what I'd like to rule out is the possibility that this is a general IME bug. Could you all try to use Fcitx 5 instead and see if this is still reproducible? Otherwise, please also provide the exact IBus version down to the patch release, since IBus really likes to introduce slight behavior changes across even patch releases that we have to look out for. |
Beta Was this translation helpful? Give feedback.
-
|
I can start with noting that I have 1.5.32 being noted as the version that has support for type=Wayland |
Beta Was this translation helpful? Give feedback.
-
|
Yeah, fcitx5 seems to work from the intial test. I'm not wed to ibus, it was just the first thing that came up when I initially was missing the dead keys. I suppose I'll report back soonish when having done a more proper setup. |
Beta Was this translation helpful? Give feedback.
-
Using the findings mentioned here I just went to that file ( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
As has been covered elsewhere (YaLTeR/niri#2476, and all of the links on that page), GTK4 applications now use Ibus when you want to compose letters using the compose key.
So in order to be able to use the compose key in applications like gnome-text-editor, Ptyxis and Ghostty, you have to install and start Ibus.
This works fine, but it introduces an annoying bug into Ghostty (Ptyxis, however, works fine). After enabling Ibus, Ghostty can't register non-printable keys (Enter, Delete, Arrow keys) after you switch focus to it in Niri or Hyprland. These keys only start working after typing a printable character.
So if you for example directly fire up a Ghostty terminal and paste something to it, no matter how many times you hit enter the text will not send (same with Arrow keys, Delete etc). These keys will only work if you print a letter first or press space.
A related issue is that after you have managed to compose a character like ā, š, etc, Ghostty freezes in the same manner. You can't delete the composed character until you insert a character or press space.
Ptyxis is also a GTK4 terminal, but it does not have this problem with Ibus in Niri / Hyprland, which makes me believe that this is a Ghostty issue with how it is handling Ibus in non-GNOME environments.
Expected Behavior
When switching to a Ghostty terminal window, one should be able to press Enter, Delete, Arrow keys without first having to type a letter.
Actual Behavior
Ghostty will not register Enter, Delete, Arrow keys etc. You have to first type something, then can you use these keys.
Reproduction Steps
How to reproduce:
ibus startibus exitenv GTK_IM_MODULE=ibus ghostty. Notice how the compose key works in the new terminal window now, and there is no bug!This is not a hard bug to reproduce, I've been able to do it on two different machines running Niri and Hyprland. Note that this problem does not occur under GNOME.
Ghostty Logs
No response
Ghostty Version
OS Version Information
Arch
(Linux only) Display Server
Wayland
(Linux only) Desktop Environment/Window Manager
Niri / Hyprland
Minimal Ghostty Configuration
#I can reproduce it with a fresh configuration.Additional Relevant Configuration
No response
I acknowledge that:
```) on separate lines.Beta Was this translation helpful? Give feedback.
All reactions